Undeserved often implies injustice or unfairness when used to describe situations. He received an undeserved punishment for something he didn't do.
Pro Tip 2/3
Emotional Impact
Using 'undeserved' can evoke sympathy or support for the person it's applied to. The community rallied around her after the undeserved criticism she faced.
Pro Tip 3/3
Misuse Awareness
Be aware that 'undeserved' can be misused to subtly discredit someone's achievement or worth. Despite his success, some called it an undeserved win.