Java is a good one to learn, especially since it seems that most of the corporate world is looking for Java programmers now. I personally dislike Java because of the way it does some things, but it touches on all your points (free, easily attainable, works on pretty much everything, won't teach you bad habits, etc).
My language of choice right now is Perl (has been for a long time). It's free, easily attainable, runs damn near anywhere, but it allows you to learn those bad habits (because it "Just Works")...
Again, I'd suggest Java, then maybe Perl. Both can do damn near anything, and of course, each has it's own strengths and weaknessess...