I have to disagree with some of Wanderlust's comments. First, I would discourage attempting to see the Alhambra by day-tripping from Seville. Stay in Granada instead. Tickets to the Alhambra cost only 14 euros when purchased from the Alhambra's website; certainly you need to buy them well in advance, because the general often sell out months in advance. Based on past patterns, I would guess the May tickets will go on sale at the beginning of February, but I'd be checking at least weekly, beginning in early January since sales policies could change at any time.
But as you realize, that's a long list of potential targets for a 3-week trip, and Andalucía is likely to be quite warm (aka "hot" to most people) by late May. I'd recommend holding off on that area until you can visit at a somewhat cooler time of year and allow time also to see Cordoba as well as Seville and Granada, and perhaps some other Andalucian towns as well.
There are worthwhile side-trips from both Barcelona and Madrid--plus interesting destinations in north-central and northwestern Spain--so you'll have no shortage of interesting places to go even if you decide to postpone Andalucía.
As for France, Nice has at least six art museums. True, none is the Louvre, but I visited at least five and thought they were all worthwhile for those interested in their particular type of art. My favorites were two of the less-conventional museums, the Museum of Naïve Art and the Museum of Asian Arts. But it all depends on your taste.
Nice is the transportation hub for the Riviera with easy access to the coastal towns by regional train and bus service (less frequent) to many of the hill towns in the area. Some people prefer to stay in one of the smaller towns rather than Nice, and that is workable as long as you don't plan to spend most of your days visiting hill towns by bus.
I haven't been to Monte Carlo, and quite a number of posters here have said they didn't much care for it. I wouldn't hesitate to go if I particularly wanted to see something described in my guide book (casino, aquarium, gardens, etc.). I think the casino has a dress code. As already noted by Jazz, it's an easy day-trip from Nice. You could travel one way by train (faster) and the other by bus if you wanted to see different scenery.
Bordeaux is attractive but I don't think anyone except the mayor would recommend heading all the way across France to see it during a short trip. It's often a stop for people planning to spend time in the Dordogne, for example. If you want to see another large city in addition to Paris, Barcelona and Madrid, I think Lyon is more interesting than Bordeaux (and easier to get to from Nice). But you might prefer to explore a less-urban area, like Provence.
Unfortunately, you might be unlucky with the weather along the Riviera and in Provence in late May/June. If you have a low tolerance for heat, you might consider heading to Normandy and/or Brittany instead. Those are interesting areas and very unlikely to be hot.
To give you an idea of how many options there are in France and Spain, I have spent about 4-1/2 months in each of those countries within the last few years. And I still haven't made it to Paris.
If you want a relaxing trip, I'd suggest focusing first on your top one or two destinations and reading about about the areas around them. That might lead you to cover less ground and have more time at each stop--meaning less time wasted on trains and buses.
You'll find fast trains available between most major city pairs. Smaller cities may require use of slower trains or buses. You can easily check the train situation (though not fares) on the easy-to-use Deutsche Bahn website.