Is there a way to do so?
Nope. Earthquake is not an egg move for Gligar, so he can't learn it through chain breeding.