Don't underestimate the value of slow and steady in the world of corporate development. Many fresh out of college might seem like super stars developers that know all the latest buzz word technologies, I know this is a massive generalisation, but they don't like to work on "boring" or "legacy" and often quick to jump ship to the next opportunity.
Also, please be aware that this feeling is a common symptom of imposter syndrome.
I've stagnated at jobs in the past. I've thought it was my problem. Then I moved on to better places, where coworkers helped each other to excel, where people placed a premium on improvement and education.
If your company shoves everyone into a cubicle and assigns them individual tasks, how are you ever going to learn? If you can get a job somewhere that embraces pair programming, you might find a whole different world. You can be mentored by your coworkers and collectively solve problems, instead of feeling like you need to put your head down and produce something on your own that may be beyond your expertise.
Fresh grads, especially grads out of code schools, often arrive with a lot of buzzwords ready to go, and a script of practices they've been told are the right way, but that's all flash and no substance. It can lead to overconfidence. There's something to be said for it, though; you can fake it until you make it. The important part is that you actually make it in the end, and to do that, you need mentoring. It sounds like you're not getting the mentoring.
I know it's hard to quit a well-paid job and take a chance, but I think that's better than going to work every day hoping you won't get fired, and not growing as an individual.
It's hard to fire them, because to many outsiders, they're workhorses. They know just enough to scrape by on each task, but they also have institutional knowledge and social connections that make them seem invaluable. Often that institutional knowledge is that they're the only person who understands their own shitty code. Their more-capable peers usually know that they're incompetent, but management doesn't.
There are many reasons people like this can survive. Peers don't want to explicitly throw them under the bus. The best of their peers simply move on--to other projects in the same company, or more often, to greener pastures at another company. Their peers cover for them, because it's easier to work around a millstone like this than it is to get them removed. It takes months of concerted effort to get a peer fired for underperforming. If you want to try to get someone like this fired, it starts to look like you're the asshole with a personal vendetta. Especially because they've been there for a decade and you probably just arrived.
These millstones aren't outright incompetent. On paper they've got extensive experience. Socially they're well-regarded by everyone at the company except their immediate peers who know they suck. They've been faking it and faking it well since long before you arrived, and they'll be doing it long after you've departed.
Make no mistake, though. These people are rarely phoning it in. They are busting ass to tread water. Sometimes they believe their own lies, but more often they are terrified that someone will find out just how bad they are. That's why they work so hard.