We just did a ten day Spain-Portugal trip with our three young adult kids (23/20/17) - flew in and out of Madrid. It was a December trip - so weather was very different!
We flew into Madrid, rented a car and drove immediately to Toledo. We loved Toledo - and easy one hour drive from Madrid and nice place to relax after a long flight. We did one night in Toledo, then drove to Lisbon - which was long. An easy drive but long.
We stayed two nights in Lisbon, which we loved (and none of us had been to Portugal). We did lots of walking - and eating.
Then we drove to Seville - which was also an easy but long drive (though we stopped in a lovely town on the coast on the way).
We did two nights in Seville, which was great - and then drove to Madrid (intended to stop in Cordoba on the way but it was just too much to add). And then we did three nights in Madrid. I know many in this forum are negative about Madrid but we loved it - we went to all three museums and the Royal Palace. We also just liked walking around (and we’d all been to other capitals - Rome, Paris, London, plus Barcelona - and still really enjoyed it). And then we flew out of Madrid.
I would have been very happy to skip the Portugal days (and drives) but my spouse and one kid were very eager to see Lisbon … and I really did enjoy it (although again, long drives - and we just didn’t want to risk trains/ planes due to covid).
I’m sure you’ll have a great trip!