Any Flying-type pokemon or Flying-X hybrid pokemon is immune to ground attacks such as earthquake, but what if the flying-X type has used DIG and is currently underground? These pokemon learn dig, and some are flying/flying-X type (such as gligar or ledian)
AFAIK the only time Flying-type pokemon can get hit by Ground moves is when they use Roost or hold the Iron Ball, or when the move Gravity is in effect.