Along the route Madrid-Cordoba-Seville, trains are much, much faster than cars. You can check the rail schedules on renfe.com and the estimated driving times on ViaMichelin.com.
Cars are very handy for the white towns in Andalucua, but your trip is very short and you will not have time for those unless you csn convince your girlfriend that--except for bigtime art-lovers--Madrid is one of those capital cities that is less interesting to most visitors than many other places in the country. The good thing about Madrid is that it has some truly excellent possible side-trips. My favorite is Toledo, but Segovia is also nice. That entire area is likely to be a lot cooler than Seville.
Ground-transportation links between Spain and Portugal are very poor, and I wouldn't want to combine the two countries on a trip of this length. I think a night train would be a risky choice. Some people find it very difficult to sleep on night trains, which can make the following day (one of only eight) really miserable. Lisbon will probably also be cooler than Andalucia.
Bottom line: If your girlfriend is adamant about Madrid, I'd do Madrid + Seville and include a day in Cordoba, either in transit or as a day-trip from Seville. You might opt to spend your first two nights in Cordoba, then go to Seville, then finish in Madrid since you will probably be flying home from there. The difficulty lies in deciding what to do about the Madrid-Cordoba train ticket. It will be cheaper bought way in advance, but what departure time will be safe, given the uncertainties of transatlantic air travel?