It depends on the format. In doubles, earthquake hits every adjacent Pokémon on the field, including your partner Pokémon. However High HP only hits the Pokémon you target, like most other moves. So in doubles, you mainly see HHP over EQ to avoid hitting your teammates, while HHP hits only the enemy Pokémon.
Hope I helped!