I haven't done that hike nor been there but some suggestions:
You can reach Santander/Gijon in a long travel day:
- TER Bordeaux St-Jean - Hendaye 08:19 - 10:56
- Euskotren to San Sebastian every 30 min (3€ ticket)
- cross the river to the RENFE station, lunch break
- MD San Sebastian - Palencia 14:00 - 18:14
- REG.EXP Palencia - Santander 19:17 - 22:25
Reservations for both last trains only possible at San Sebastian ticket counters. Both trains have over 100 seats left so you'll be fine.
About 75 for Palencia - Gijon.
Or the very slow route along the coast. You could spend a night somewhere as well:
- TER Bordeaux St-Jean - Hendaye 10:51 - 13:21
- Euskotren and break
- San Sebastian - Bilbao-Matiko 15:50 - 18:25
- 20 min walk
- Bilbao-Abando - Santander 19:34 - 22:30
Free reservations but still required (Spain/RENFE in a nutshell).