For e.g., Spring framework (java) makes all the classes available through dependency injection as Singleton classes and adding prototype is optional.
Not at all. In my opinion, if used sparingly, it's actually one of the most useful patterns you'll find. It's an easy way to solve otherwise extremely difficult problems. Sure, every criticism is true, but to be honest, I'm willing to deal with a little bit of a bad pattern in an otherwise well designed application / framework that follows the other, better patterns.
The best example of an effective singleton, in my opinion, is a
LogManager—something you typically use throughout your application, but you want to have it defined, configured, and managed in only one place. In most other cases where I started out using a singleton, I eventually ended up refactoring the code into something else. But I still keep the singleton pattern in my back pocket for those rare cases where it does more good than harm.
I've never used Spring, and barely used Java, so feel free to take this answer with a grain of salt.