Rather than focusing on character flaws, focus on character strengths. Hey, it's sometimes cool to completely rip apart the adversaries without breaking a sweat.
One thing some people get in a habit of doing is constantly reinforcing that the PCs are not the biggest, baddest thing on the planet. It is fine, every once in a while, to let the PCs know that there are dangerous things out there. But to constantly beat them down is counterproductive.
On the opposite side of the scale are the adventures that are always a cakewalk. There is not challenge, no threat, and no tension. There are times when this is also coupled with the linear story that the PCs are the characters of, but seem to just be along for the ride in.
None of these is optimal in my opinion. However, most of us have passed through these phases as we try to learn how to run an excellent game. Hopefully, we don't linger in any of these phases overlong.
What I do is I establish NPCs that are more powerful than the PCs at the beginning of the campaign. Some will be a little more powerful, some are quite a bit more powerful. I then let the PCs benchmark against the NPCs they have met. The day the PCs ask for something outside of the NPC's ability, but just within reach of their own, shows where they have advanced.
This gives the PCs the realization that they are doing things others cannot. They may know that somebody out there is more powerful, but not everyone is. As well, they can always improve.
Of course, I also try to use these NPCs to build ties to the game world for the PCs. Mentors, friends and those that need help. They also offer advice and information on what has transpired in the region since the PCs were last there. For the occasional NPC, I also use them as an example of what heroic behavior might look like. The cleric who sacrifices himself to turn aside a great evil, the rogue willing to take death defying risks to get where he needs to be, those sorts of things. I show my players how much fun can be achieved with heroics and then I hope they extrapolate that and show me even more outrageous stunts and heroism.
Give the PCs room to grow. Hit their weaknesses at times, but also play to their strengths. If they got their butts handed to them by a band of bugbears at low level, give them a band of bugbears at higher level. Don't necessarily advance the bugbears! Let the PCs wipe them up quickly. They will relish the way they advanced and improved. Give the PCs opportunity to make the heroic sacrifice, or do the daring deed. If they choose to, reward them with a fine story to tell.
But in the end, you can't make them be heroic. You do need to give them the opportunity, but they have to make that decision themselves.