...I would personally leave the south (Andalucia)apart unless you really like hot conditions. You can reach Barcelona or Madrid, and spend there some days. Lots of opctions in both places, that we can discuss in a later stage.
Either you can arrive Barcelona, or Madrid...you can easliy travel from one to the pther by hish speed train.
I would go to the North of Spain, and spend some time visiting Bilbao/San Sebastian, and enjoy there the more fresh temperatures. Food and drink will make you VERY happy too. End June there are some nice Jazz Festivals, with lots of live concerts at the beach and the life at the stree is amazing. There is small ride by car between them, and thousands of places to visit around.
Even you can drive to Biarritz, in France which is a gorgeous place. Or you can drive to the interior and visit all the are in La Rioja, and visit some of best vinyards of Spain.
If you have some time take then a flight to Santiago de Compostela, in the other corner.
If you like the plan, then we can go into details...and I will be very please to help you.