A post-trip postscript for anyone still following this thread.
I successfully pulled off the trip using trains, but only after American Airlines graciously agreed to let us change the return flight to extend our trip by two days while waiving the $600 in change fees. It took awhile with their customer support, but the original tour operator provided proof they had cancelled the tour, which helped. Shout out to AA for doing A Good Thing.
We stopped (for a few hours or overnight) at Burgos, Segovia, Madrid, and Salamanca. The cathedrals were magnificent. We were also going to include Avila but had to give that up in order to get another day in Madrid to catch the Prado, which was closed on May 1st when we originally planned to visit. We had a lovely trip.
For those simply trying to get between Lourdes and Fatima, the overnight train from Irun to Lisbon is an excellent way to do it if you don't care about seeing locations in Spain in between. We caught that train in Salamanca (at 1am!) and had a sleeper compartment. All the way from Irun would have been very relaxing.
One slight hitch: the train from Lourdes to Irun is French (SNCF), naturally, while onward from Irun to Burgos was Spanish (renfe). I tried to buy the tickets online through the SNCF website, but it only gave me the Lourdes-Irun ticket. We got to the station with barely time to get onto the train and no time to print the Irun-Burgos ticket at the kiosk (ticket window was closed so no human help). Found out after arriving at Irun that the remaining ticket HAD to be printed in France. We could buy a new ticket there in Spain but the ticket office could not refund the existing one; that took quite a bit of time online and on phone with SNCF but eventually got done (minus their online booking fee). So beware the cross-border ticketing as well as cross-border car rental!
Stan