The problem with doing Cordoba last is that--unless you want to squeeze in Toledo--you then have to begin the trip in either Seville or Granada. Both those cities are a considerable distance from Madrid, and the rail tickets are likely to be quite costly if purchased the day of travel. Bargains can be had if you buy the tickets quite early, but those tickets are good only for the specific departure date and time you choose.
It's a challenge to guess (and that's what it is, a guess) how much time to allow between the scheduled arrival time of your flight and the departure time of a train (which will leave from Atocha Station downtown). You could be very conservative and allow a 5-hour gap, but that's likely to be more time than you need. How will you feel as you sit, sleep-deprived and jetlagged, at Atocha while multiple trains to your destination depart but you cannot take them because your ticket is for a later train? But if you are less conservative in your choice of departure time and your flight is delayed or canceled (or Immigration is backed up, or one of your bags goes astray and you end up in a long line of folks filing lost-luggage claims), the aggressive bargain ticket you purchased well ahead of time will be useless and you'll have to buy a new ticket, probably at a high price.
This is an awkward situation to be in, because there's no predictable correct choice; there's just what turns out to be a lucky choice or an unlucky choice. The risk of financial loss is less if that first rail trip is a short one. Toledo (aside from being one of Spain's top sights) is ideal as a first stop in this situation because the rail fare is fixed at only 13.90 euros.
But you have only ten full days (eleven nights) in Spain and have to spend the last night in Madrid, leaving ten nights to distribute among your other stops. That works well for Seville, Granada and Cordoba but gets tight when you try to add another destination. I love Toledo, but I'd vote for taking somewhat more financial risk on the train ticket and starting the trip in Cordoba.
Another thing to consider is that it is far from rare for trains on the Barcelona-Cordoba-Seville line to sell out before departure, so there is some risk involved in waiting to buy that ticket until your flight lands in Spain. Trains to Toledo can also sell out, but I'd guess that's not too likely with midday trains unless you're traveling around a holiday. I don't know about trains to Granada, but there aren't many of them, so you don't have a lot of options there.