I am looking for a great destination leaving San Sebastian back down to Madrid. I have two nights and two days to fill before flying out of Madrid. We are two adult women and two young adults.
Salamanca is about the right size. A university town, so will have a vibe for the young adults. Not exactly direct, however.
Are you traveling by car or by train?
The driving route takes you through/near Vitoria-Gasteiz (capital of the inland portion of the Basque Country; large hill-top medieval district) and Burgos (lively city on the pilgrimage route with pretty historic district, very good cathedral and two interesting monasteries). Both are very worthwhile destinations and could fill the better part of a day if not longer. I can't comment on their accessibility by car, however.
Off the highway between V-G and Burgos is the medieval hill-town of LaGuardia. Very atmospheric. It's near the La Rioja wine area.
Beyond Burgos, ViaMichelin.com gives a couple of options for the rest of the trip. The western route goes to/through Valladolid, which I have not seen. Positioned between the western route and the eastern route is Segovia. Very attractive town with more to see than the (fabulous) aqueduct. Avila (to me, much less interesting) and El Escorial (not visited my me) are near the western route.
If you're traveling by train, the stops include Vitoria-Gasteiz, Burgos, Valladolid and Segovia, plus some smaller places I haven't visited.
Burgos. Two days is just the right amount of time to see it and it's about half way between San Sebastián and Madrid.
Burgos and Valladolid are both along the direct train route, and make easy single night stays.
Train timing examples ...
ALV 4086
Dep 08:57 SAN SEBASTIAN/DONOSTIA (Spain)
Arr 11:54 BURGOS ROSA DE LIMA (Spain)
ALV 4086
Dep 11:56 BURGOS ROSA DE LIMA (Spain)
Arr 13:09 VALLADOLID (Spain)
ALV 4142
Dep 17:04 VALLADOLID (Spain)
Arr 18:07 MADRID-CHAMARTIN (Spain)