Firstly, I'll give my backing to the link provided by Mushroom25. It takes you to the German Railways website which has timetables for the whole of Europe (including the UK). More importantly, it has the ability to integrate the individual timetables into one consolidated document so that you can plan journeys across several countries with just one enquiry.
If you plan on doing much rail travel in Europe, I'd strongly recommend getting hold of a copy of the Thoma Cook Rail Map of Europe. It's available from most good bookshops. I've just taken a look at my copy and I can see that there are train services from both Santander and Bilbao which will link you into the main international network. However, it's likely that the first part of any journey starting from either of these towns would be on slow, local lines so Mushroom25 is probably correct in suggesting that you should consider starting your journey by bus.
As far as accommodation is concerned, I've just taken a look at
http://www.hostelworld.com
For the random date I chose, the site offered cheap accommodation in Bilbao in 2 hostels, 2 budget hotels and 2 guesthouses. There were no hostels or budget hotels offered in Santander but there were 7 (really cheap) guesthouses to choose from.
Chris