Sure they are over paying for him but they're not fools as you suggest. Like it or not, his value sky rocketed at the exact right time for him. And while there is a PR aspect to this, the football aspect predominates. The Ravens cannot let their talented, young QB go even if he needs to be paid $20m instead of $14m which he should probably get.
Giants had the same issue with Eli...ditto the Jets with Chad. If you want to keep what you think to be a franchise QB, you need to step up and pay them. At the time, Eli didn't deserve to be the highest paid QB in the league, but he won a Super Bowl, his name was Manning - you don't cut bait in that situation over a few million. And while Chad was a different story, somewhat, with the Jets and clearly warranted less than what Eli/Flacco got (on a relative basis), the Jets had to make a commitment to him - just the way it works. With Eli it worked out. Chad? Not so much.
Eli restructured in the 2012 offseason to lower his cap hit. And then promptly missed the playoffs. I never said these teams should cut bait, just that the sentiment of, "he won a Super Bowl, pay him whatever he wants!" is a bad team-building strategy. The Ravens could have done better with these negotiations, but not much better.
You can count on one hand the number of QBs in the league who deserve Flacco money, and Flacco isn't one of them.