I’m not sure how set in stone visiting those cities is, but there’s a lot of travel time getting to the next stop.
If you didn’t want to drive all the way to Salamanca (2.5 hours from the airport) you could spend your first night in Ávila, since you need to drive right past it anyway, to get over jet lag.
Salamanca to Santiago is about a 4.5 hours drive. En route you could take breaks in Zamora or Puebla de Sanabria. Sanabria is small and has a nice castle and compact town center.
Since you’re interested in UNESCO sites, when leaving Santiago head up to Lugo for its Roman wall that surrounds the town, then head over to O Cebreiro. It doesn’t take long to visit. Continuing east, you could makes short stops in Ponferrada or Astorga before arriving in León.
Burgos and Vitoria-Gasteiz Gasteiz are between León and Pamplona, but they both deserve more than a couple hours visit. Just outside of Burgos is Cartuja de Miraflores (Royal Pantheon of the parents of Queen Isabella the Catholic, John II and Isabel of Portugal.)
Of the places you mentioned, Pamplona probably the least interesting. One full day there is more than one needs. By dropping it and one day in San Sebastián you could add a night in León and two in Burgos.
You may want to consider dropping off the rental car the day prior to departure and spending the last night closer to the airport or in Madrid.
In 2017 we took a northern Spain trip, but had a few more days. My website has photos to give you an idea of how we divided our time. Many of our stops were at places along the French Camino de Santiago. We visited Lugo in 2019 on a different trip.