People can speculate all they want about the future of anything. But realistically speaking, people are always going to need somebody to correct their vision and treat other diseases and disorders they may have. As such, I strongly believe that there will always be optometrists.
At the current rate, AOA research indicates that the supply of optometrists exceeds the demand (yet does not exceed a theoretical need). Who knows how long this will continue. If you look at past supply/demand trends for lots of professions you'll notice that they go in cycles. I don't think optometry is an exception, it is just a question of when the supply/demand ratio will even out.
There are many challenges that face the profession, but I don't think we should be viewing them from the point of view that optometry should be avoided (unless you want to intentionally scare people away). Rather, we should educate ourselves on the problems and devise ways to make smarter decisions once we graduate and even work together to correct some of the issues.