I agree with EyeCaptain. I just had lunch with a professor the other day who graduated from optometry school in the early 70s. He said people were making the same claims back then - private practice was dying. But that didn't happen. It has changed a lot since then - you couldn't even dilate patients back then (at least in California). But people are afraid of change and say that spells the end of things. He told this one story about Kaiser (an HMO)...I think it might have just been relating to one Kaiser hospital that was doing a renovation or for some reason wasn't doing eye exams for a couple years. Anyway, they allowed the patients to go anywhere and submit the claim to insurance. Once Kaiser was willing to take them back, only 1/4 of those people went back to Kaiser. The other 3/4 found that they preferred private practice doctors who took more time for exams. There will always be people for every mode of practice - some people prefer the quick and efficient exam at Kaiser. Some ODs want to practice in that model. Some people will prefer the private practice, and some OD's will want to practice in that model. Private practice will ALWAYS have a place. Just because the field is changing does not mean it's going downhill. That same doom and gloom story has been around for a LONG time.
That said, student debt levels are sky rocketing and THAT is a problem. Be frugal. Figure out how to minimize what you take out so that you aren't paying it off until retirement. Be open to living in smaller communities. You will have a much larger patient base, a much more loyal patient base, a higher chance of practicing in a wider scope (especially if you are the one and only eye expert in town), etc. It doesn't mean you have to go rural right out of school, but if you want to be able to open up a private practice and have a pretty good shot at success down the road, then you probably have to be open to smaller towns.
Study hard so that you leave knowing more than the minimum expected of you. Take every chance to get good experience - work part-time in an office, go to conferences, take on leadership positions, etc. All of those things will help you build a network and give you so much more knowledge about the field and what's going on in it so that you can be really successful.