"Hard to beat" means that something can't get any better than what is. "Hard to beat" can also mean difficult to injure by hitting. A boiled egg is hard to injure, or you can't get any better than a boiled egg. This joke is playing on the word "hard to beat" and its different meanings.
A boiled egg is hard to beat .