Flacco performed like an above average QB, I'd say top 15 for sure, maybe borderline top 10. Right there, that doesn't deserve $20 mil a year. Honestly, like $12-$15 mil a year at best.
He played very well in the playoffs, extraordinarily well, earned Super Bowl MVP. He basically had the Ravens by the balls, they couldn't let him go, the fan base would be in an uproar, the team wouldn't like it at all.
So he gets paid. This upcoming year, the Ravens are losing their defensive leader in Ray Lewis, and possibly Ed Reed. Those guys might have been declining, but they still had some game and leadership.