You are taking the train from Madrid to Seville. That train goes right through Cordoba.
After 2 days in Seville, you're going to take the train back to Cordoba, spend part of the day there, then take the train back to Seville for the night. That wastes money and time. You may have plenty of money to burn on this trip, but you don't have enough time to throw it away like that.
Hint: When you find yourself slicing days up into different parts, telling yourself you will spend the day in a city, then get on a train in the evening and go to a different city, that's often a sign that you are not being realistic with yourself about how much usable time you really have. If you build this into your schedule many times, that's usually a giveaway that your plans are not realistic. Been there, did that (until I learned you can't stretch time like that and still enjoy the places you blow through). Just my own experience, maybe you are different. With a family of 4, my guess is you might be less efficient than you expect (the larger the group, the slower it tends to move).
Biggest, most obvious issue I see is that, with the exception of Seville, on your entire trip, you never spend more than one full day in any place -- you will be constantly on the move, only pausing briefly. You have sliced things so you have one full day (in some of the world's greatest cities to visit) and part of the next day, which means maybe half a day, since you will need to check out of your hotel, deal with baggage, deal with the train, etc. You have just one full day in Barcelona, one full day in Madrid, two days in Seville, and everywhere else, you have less than a full day. (And you spend a full day in Malaga...). None of that is good plan IMHO.
Every time you move from one place to another, that consumes part of a day -- maybe 4 or 5 hours if you're efficient (a group of 4...) maybe half the day. You are not being realistic about how much time it takes just for getting around, and for the basic boring requirements/logistics of human survival (eating, sleeping, finding your way, the basics).
I know this is not what you want to hear, but saying you have "a crunch for time" is not an honest description of what you are looking at doing. Far too much of the time on your trip will be spent looking at the world pass by through train or car windows, not enough time spent being out in that world. The ratio of "getting there" to "being there" is just too lopsided.
Here's the fundamental problem: You have 13 full days on the ground. You have 9 or 10 different "locations" (Madrid counts for two, I'm counting "white hill towns" as one, and day trips out to Gibraltar and Nerja as one each).
Sorry to be the skunk at the picnic, but I think you need to make some significant changes to your plan. For starters, I'd begin by cutting out the whole Gibraltar/Malaga/Nerja section, reallocate that time among the great cities (Barcelona, Madrid, Granada). Do Cordoba as a half-day stop on your way from Madrid to Seville (Cordoba deserves more time than that, but you don't have it, and you can hit the most important Cordoba sights in a half day stop off the train).
While I found Gibraltar fairly interesting (I'm a history fan) none of those places (Gibraltar/Malaga/Nerja) is so special I'd spend the days in these places on this very short trip. You need fewer "one night stands" and more full days. And you need to be more realistic about how much time you will burn just moving from place to place (I say this as someone who is not shy about moving fast).
Time to sharpen your pencil and get out a clean sheet of paper, I think. I hope this is helpful (even though I know it's not what you will want to hear).