We went to Southern Spain last year around that same time.
We flew in and out of Madrid, opting to save most of Madrid and Barcelona for another time. Our trip looked like this:
Day 1: Land in Madrid, short flight or train to Sevilla. Walking tour of Sevilla. You could do a horse carriage tour to save little legs.
Day 2: Sevilla, Alcazar and tapas tour, flamenco show. Probably too much for one day with a little one.
Day 3: Cooking class (not for little one), cathedral rooftop tour (I’d be scared with a little one for this)
Day 4: New Years Eve. Many restaurants closed in evening. Get reservations well in advance. Day trip to white hill towns. I suggest you consider the white hill towns as a way to slow down your trip and enjoy smaller places that might be better with a little kid. But not as a bus day trip — do it over a few days on the way to Granada.
Day 5: New Years Day. Train trip to Granada. Visit to Hammam. Low-key day for us. Also a holiday when things are more closed.
Day 6: Jan 2 is a holiday in Granada. We wandered the old town, saw a parade, had a tapas tour, etc.
Day 7: Alhambra. Cathedral.
Day 8: Train to Cordoba. Mezquita (!!!). Patio visits and wandering. Evening horse show (not a good idea with little one).
Day 9: train to Madrid. Royal Palace closed for epiphany celebrations that night. Did a tour of Renia Sophia art museum.
Day 10: flew home.
If we did it again, we would skip the white hill towns and just have a free day in Sevilla, although seeing the countryside was nice. We would also have spent more time in Cordoba, taking a late train to Madrid and skipped seeing anything in Madrid.
For you, I think Sevilla and Cordoba are great options. And, with a little one and your stated interests, a focus on those two places is enough. We were exhausted from our trip — it was all too much. And yet, didn’t have enough time in Sevilla to wander and just enjoy the place. There were many things I wish we had been able to see.
The Christmas lights in Sevilla were amazing. There is also a lovely area near the “mushrooms”
in Sevilla with little rides etc that would be good for little one.