But many writers (myself included sometimes) screw this up royally by leaving out the “unjust” part. Be warned: watching a hero receive a well-deserved dressing-down has the opposite effect. After all, if a hero has genuinely screwed up, then he has no right to burn with indignation while he gets humiliated about it. The more indignant he gets, the more the audience will be turned off. The hero should be criticized for screwing up.
It’s not inherently unfair when your hero fails to get a job, or gets dumped, or gets kicked out of school. It’s only unfair for them to not get that job after we’ve seen with our own eyes that they really deserve it. It’s only unfair to get dumped if we know that they were about to do something really nice for their sweetheart. It’s only unfair to get kicked out of school if someone else did something wrong but your hero nobly accepted the blame.
You’ve probably based your hero on yourself, so you feel that it’s automatically unfair if they suffer. But the audience doesn’t know you, or your hero, and they get to decide for themselves whether or not your hero deserves to suffer.
And you can’t take a well-deserved criticism and make it villainous just by putting in the mouth of a jerk. In Iron Man 2, Senator Garry Shandling thinks that an American millionaire shouldn’t be able to fly around in his own war-suit attacking his personal enemies. He’s entirely correct, of course, but he’s a dick about it, so we’re supposed to boo and hiss.
It might have worked to have a reasonable senator criticize Tony Stark and send Stark into a doubt-spiral, or to have a dick senator claim that Stark was trying to kill people that he was really trying to save. But putting legitimate criticisms in the mouth of a dick senator gives the audience no one to identify with.