Not free, but http://webfaction.com is a shared hosting provider I've used in the past that has a one-click setup for Django, Rails, etc. Plus they offer PostgreSQL (which not a lot of shared providers do). I don't use them anymore, but I think it's something like $10/month for the cheapest plan. It's great to learn on.
But as far as what to learn, I'd highly recommend Python and a web framework such as Django or Pylons.