There are only 3 possible reasons as to why this may be the case, although we won't know which possibility it is specifically until we know more about the battle you had.
- Your Charizard used Roost at the beginning of the turn before Earthquake were to hit your Charizard. When a Pokemon uses Roost, it loses its Flying type up until the beginning of the next turn. This would allow Earthquake to hit your Charizard and land super effective damage.
- Your Charizard mega evolved into Mega Charizard X, which would result in Charizard's Flying type being changed to be Dragon type. Thus, it'd be hit by Earthquake, and for super effective damage.
- You weren't using a Charizard at all, or your opponent used a different move entirely.
Unless your game is hacked or you're playing on an emulator, these are all the possible reasons as to why Earthquake would land on your Charizard.