Traveling along the coast or going inland is a personal preference. Both make for pleasant experiences. If deciding to go inland then you need to decide how far inland to go.
There are a couple considerations however. I did a dummy booking for rental cars with pickup in Toulouse and drop off in Porto and the one way drop charge was as much as $2,000 USD. Making a loop, starting and ending in Toulouse would be preferred to save money. If making a loop take a coastal route one way and return via an inland route.
Another consideration is where you intend to enter Spain. From Toulouse, the easiest way is to drop down to Andorra then over to the coast. A couple other routes are to go to either Pau, then down towards Canfranc, or over to Bayonne then into Spain. If entering at Andorra there are few major road immediately by the Pyrenees to take one over to the Basque coast. There are plenty of places along any of the routes that are worth visiting and will occupy some of your trip time.
While 28 days seems like a long time it will go by quickly. Pick out the cities, towns, villages, etc., that you think you’d like to visit and a potential route will start to appear. Then, you can fine tune the route and places you want to stop at based on how many nights you’d like to stay in each place.
On my trips I try to limit daily driving time to 3 hours and try to break that up with stops in out of the way places, or places along the route. While I could mention any number of places I enjoyed you need to select places that speak to you and not visit a location based solely on what others say.
In 2017 we did a shorter 17 days northern Spain trip starting and ending Madrid. We only went as far west as Santiago de Compostela and as far east as Saint Jean Pied du Port. The photos on the linked page will give you an idea of the countryside, as well as León and Burgos.