Having had both, these are lower impedance, so will sound fine from any source.
The ER4 series benefits from a better source.
These are rubbery plastic with a fixed wire. Many people seem to break them after a year or two.
The ER4s have detachable cables and a metal body. They are very sturdy.
Sound wise, these lack some extension in the treble. Cymbals sound like someone has their hand on it. More mid-bass, but less quality. The base sound is very similar though, same kind of tight soundstage and good separation. Maybe a little less detailed depending on your source.
The ER4s are better overall, but cost 5 times the price. If you have a noisy commute though, the HF5 is like magic if deep insertion works for you. I returned my HF5 and got the ER4XR because I was looking for something I would use forever.