While certainly I've heard of foreign nurses completing the CGFNS and NCLEX process and becoming licensed to work in the United States, I've never heard that foreigners are being educated for free in the United States – if this were the case, people would be beating down the doors at every port of entry to get in.
One reason that education is so expensive is that, unfortunately, education is an industry, and in some cases, institutions are for-profit. Otherwise, schools do need to cover salaries, heat/cool buildings, pay for equipment, etc. And as you know, some schools are more costly than others – look at Ivy League versus state schools.
And one reason that nursing programs are difficult to get in, is that there are far more applicants than there are vacancies, so there is a lot of competition. A 2005