I lived and worked in Southern Spain for 4 months back in 1997, and we loved it. Only regret is that we were there Jan-April and didn't really enjoy beach weather. We lived in Sotogrande and I worked in San Roque/Algeciras. I was working the commissioning/start-up of a chemicals/plastics plant.
Sotogrande has the Valderrama golf course where the 1997 Ryders cup was played.
We also visited Merida, which has the largest Roman ruins in the Iberian Peninsula.
Grenada has the Alhambra fortress. Cordoba has "la Mesquita" former mosque and a Roman bridge.
In the Madrid area you should go to El Prado museum and the national palace. In the surrounding areas you can day trip to El Escorial, Segovia, and Valley of the Fallen 9Valley de los Caidos). South of Spain you have Toledo Consuegra (Don Quixotesque windmills).
With "only 10 days" you can probably see only Madrid and surrounding areas and then work towards the south, or Madrid and surrounding areas and more of the central/north/Barcelona regions.