Some friends walked the Baztan from Bayonne to Pamplona.... but not sure how easy it would be to get to and from? It's 5-6 days long and they said it was beautiful.
My thought, too.
Train from Madrid to Irun. Local bus to Bayonne...and you're on your way. Return to Madrid from Pamplona.
It is a lovely 5-star camino!
For a bit more intense mountain drama, you could walk the San Salvador from Leon to Oviedo. I haven't walked this way but it gets wonderful reviews.
Soria to Burgos is also a possibility.
Here is a thread with some chatter about the area, with some tracks. I've only walked the last 3 days, from Santo Domingo de Silos, and it was spectacular...very special.
I don't know how long it would take in total but
here is a link to whet your appetite. Plenty of people here have done this and it looks wonderful - you can start by looking at
@alansykes 's and
@peregrina2000 's accounts - jump ahead to the sections past Soria.
Another thing you could do if that's too long or remote is to start in SDdS, merge with the Frances in Burgos, and see how far you get from there. If you are young and fit, you might easily get to Sahagun, which has easy train connections back to Madrid.