Rail Europe is a marketing company owned by SNCF (French national rail) and some other national rail companies. It sells tickets in North America, usually at a higher price than if you were to book on a national rail site or walk up to a ticket window in Europe.
Bordeaux-Poitiers TGV standard 2nd class fare is €36.10 and a Loisir fare is €25.90. The standard 2nd class fare for a bunk in a four-person couchette on the Poitiers-Madrid Chamartin Elipsos night train is €158. The Prem's fare is €70.
The 2nd class fare for a day train from Bordeaux to Irun is €25-€35. The 2nd class fare for a day train from Irun to Madrid Chamartin is €47.50.
The online Tourist class fare for Madrid-Barcelona is €105.30.
You can fly Madrid-Barcelona on Vueling for as low as €40.