Hi!
According to Michelin, Lisbon Madrid is about 628 km.
Allow 6 to 7.5 hours dependent on traffic conditions and stops.
Note that part of the distance is on toll roads.
En route three towns to visit are:
Evora - Portugal (20km of the motorway - Roman Ruins and UNESCO World Heritage Site)
Badajoz - Site of Napoleonic War Siege/Battle
Toledo - Spanish Hilltop town famed for silver working
among others.
Check out the listings on Wikipedia.
Hope this helps