You open a very interesting question. I wholeheartedly agree with you. I've made similar observations.
I've been programming professionally for several years already and what I have observed is that the amount of good programmers out there, of great developers who love their work and can do it with quality and passion is pretty much close to zero. I probably met only one person who could teach me something. Most of what I know I have learned by myself, reading books and forums, asking in forums and googling for revelation thoughts.
After a while I don't regret this much.
The options to learn in a working environment can often be limited. You don't start things. You don't finish them. You don't design, don't improve, don't refactor, don't think about architecture, you just code and hack things together. It's how most of the shops work. Not only you don't learn anything, it's more likely that you will learn mostly wrong things how NOT to develop software. I've been continuously seeing scary things around me, all those anti-pattern you have heard of. What is worse, I'm forced to do them myself.
I don't know how it happened, but I managed to somehow build an input barrier. I stay open, listen and if I see some potential for self-improvement I research and maybe adopt some technique or idea. But no BS can ever get through. I have worked in badly run projects for a long time, but I have not adopted any of those bad techniques for myself.
I pretty much soon understood that if you wish satisfaction with programming, forget about job and have your own personal project. It's where you can apply all your love, passion and knowledge to do things right with the high quality level. You will learn a great deal of stuff, a myriad of things you would never have been exposed to and challenged with when hacking boring corporate staff. I only do my job for paycheck and get satisfaction with my own personal projects.
One thing I truly don't understand is how this situation is possible nowadays. Software development has matured a lot. It has had good and bad experience. Many successful projects and a great deal of failed ones. There is experience with long-term projects and understanding what long-term effects one or the other organization will bring upon the project. There are numerous studies available and good books written. "Pragmatic Programmer", "Code Complete", "Mythical Man-Month", "Design of everyday things" and others. Why nobody but us, the programmers ever reads them? How it is possible that even after 20 years of working in IT most developers and managers never found a time to read one or the other methodology book. They are written for, but hardly read by, those who need this medication most.
Regarding career perspectives. What I also have noticed in general on the job market for employees, is that employers out there increasingly lose interest in quality work (imagine they had it once) are shopping more and more for the cheapest work craft available. You find it hard to sell your knowledge, experience and understanding of the universe to anyone. It's not in demand. What is in demand is having your projects ruined by the juniors who have no experience and desire to do professional work. Cheap people are used and abused and then thrown out so that the next round begins. Projects are also outsourced to low-wage destination where they are done by people who apparently begin to learn programming just with your project. That's one thing I truly don't understand.
I'm entertaining more and more the idea that I will drop employed programming work at some time in the future. I would very much like to work in my own start-up with my own project. If not that, I'm considering trying freelancing or probably changing the payed job nature. After all, I hardly learn anything during working hours and I don't get any satisfaction at all. I can do anything 9-5 and always have satisfaction with my own personal projects. I learn much from online communities. I receive here attention, support for my ideas and on occasions even recognition I could never get with my job and my work colleagues. Will see where I will be in the future.