I flew from Toronto to Paris (Charles de Gaulle airport) on Air Transat, arrived about 11 a.m. and got an early-afternoon train to Bayonne (five hours or so, very pleasant, much cheaper than flying), where I spent the night in a hotel across from the station. Then I took the morning train to SJPP and started walking at mid-day, staying the first night in Orisson. I booked the two trains and the Bayonne and Orrison accommodations ahead of time, so it was smooth sailing. You can get a train to Bayonne or Biarritz directly from the Charles de Gaulle airport, but I took the Paris RER system in to Gare Montparnasse to catch an earlier southbound train and thereby avoided arriving in Bayonne late at night. From what others have said, the local Bayonne-SJPP train is no longer operating, but the bus would be fine, too. It's a short trip.
I find that Air Transat is usually the cheapest for Toronto-to-Europe flights, and they operate many, many more flights, and cheaper ones, from Toronto to Paris than to Madrid. I purchased a one-way ticket because my time was flexible and I didn't want a deadline looming while I walked. About ten days before my return, I booked on Vueling from Santiago-de-C to Brussels and on Air Transat back to Toronto. The two Air Transat one-ways cost about $150 more than if I'd had a round-trip ticket, but the flexibility was worth it.
You have lots of time to plan, but hope this helps!