If you plan to include the Basque Country, Galicia or higher elevations in the Pyrenees and could go there first, you'd probably be OK starting the trip a little earlier. Those parts of northern Spain are not usually hot even in mid-summer. I have not researched fall weather in Spain so cannot provide any personal guidance on that score. However, the website wunderground.com has actual day-by-day weather stats that you can access by choosing History > Monthly. Take a look at 2017, 2016, 2015, etc., to get an idea of the range of weather you can expect.
I haven't been to Andalucia recently and have gotten close to, but not into, the Spanish Pyrenees. Of the parts of the country I have seen (summer 2016), I thought these were the most scenic--speaking of countryside here, not townscapes or historic districts of cities, where Spain provides very many wonderful choices:
- Picos de Europa (but has a limited season if you don't want to ski)
- Basque Country
- Galicia
Much of the area around Madrid is scenically dull.
If you like visiting the back of beyond, Extremadura has some off-the-beaten-path cities that wouldn't be terribly far from a Lisbon-to-Spain driving route, but I didn't find the scenery as dramatic as the areas I listed above.
Another infrequently visited place I really liked was Teruel with its mudejar towers and scattered early-20th century buildings. With a car you could efficiently see Teruel, Cuenca and Albarracin, a place I have not been able to reach by public transportation.
My first step would be to read a comprehensive guidebook for Spain. I think you'll quickly see that even with six weeks you must be very selective. There are just too many fascinating destinations.