I traveled through the Basque Country without a car, but as you get down to La Rioja a car would probably be essential. And with a family, that's the way I'd go.
The hill town of Laguardia is quite near the LaRioja wine region. Laguardia is very picturesque and has a few wine bars.
The Basque Country is a great part of Spain to visit in the summer because it tends to be overcast (possibly rainy), with very moderate temperatures. However, I agree that you won't have a great deal of extra time after Madrid and La Rioja. The interior Basque City of Vitoria Gasteiz has a large medieval district on a hill, with escalators to assist you on the climb. It's a good day-trip destination or would make a pleasant overnight stop. It's only about a one-hour drive from Laguardia.
Just looking at ViaMichelin's proposed easterly driving route from Madrid to Laguardia (since I don't know your planned destination in LaRioja), I see that it goes through or near one place I really enjoyed and several I've heard are interesting:
Alcala de Henares - historic university town with very pretty historic center
Guadalajara (haven't been there myself)
Siguenza (haven't been there myself)
Soria (haven't been there myself)
The second route runs farther west and goes through Burgos, a particularly attractive town on the pilgrimage route to Santiago de Compostela. There's a great cathedral and a very lively, pilgrim-filled historic area.