I assume you're going to be using public transportation. On this itinerary a car would slow you down.
Have you checked flight schedules and airfares? What you've planned is efficient; I certainly hope you can fly into Seville and out of Barcelona. I'd have liked to do that in 2019, but it would have cost me an extra $500 or so to land in Seville rather than Madrid. Since this could affect the order in which you visit the cities, it would be best to pin down the arrival city now (if you haven't already got flights arranged).
Thirteen nights isn't a lot of time to try to cover Spain from Barcelona to Andalucia.
I think you are shortest on time in Seville. Seville is a good-sized city with a lot of sights. If Night 1 is the day you land in Spain after a transatlantic flight, I really wouldn't count that day at all due to jetlag and probable sleep deprivation. To me, your schedule looks like just 2 full days in Seville.
Although I adore Barcelona and think no stay there is too long, unless you want to track down every single modernista building in the city on foot plus go to some museums, you can probably manage with the 4 nights (3 days) you have planned. If you leave Madrid early on Day 10, you can be in Barcelona by noon, giving you about 3-1/2 days there if you are the type to settle in quickly. You will need to research Barcelona sightseeing options carefully, because you'll need to prepurchase entry tickets to quite a few places to avoid long lines.
Two nights in Granada is what a lot of folks plan; I think you can work with that. Don't forget to buy your Alhambra tickets well ahead of time.
I agree that 1 night in Cordoba isn't good. Aside from the whole avoid-one-night-stops rule, there's the fact that there's more to see in Cordoba than just the Mezquita, and one night gives you much less than a full day. If you can't scramble another night there, you might just as well day-trip to Cordoba from Seville (less than 1 hour each way, and no luggage to deal with or hotel to check into). I Iike Cordoba a lot; I spent 3 nights there, giving me a bit over 2 full days, and I didn't run out of things to see. If you need to stick with the one night, you can pick up a bit of extra time in Cordoba by visiting it on your way from Seville to Granada; that's the route at least some of the trains take. Cordoba's a quicker trip from Seville than from Granada. There are also a lot more trains between Seville and Cordoba than between Granada and Cordoba, so you'd have more choice of departure time.