If the target creature is an illegal target by the time Undying Rage tries to resolve, it doesn't resolve. It's put into its owner's graveyard from the stack rather than from the battlefield, so its last ability won't trigger.