Okay, let's say a Haxorus with Mold Breaker uses Earthquake on Rotom-Fan. Will it hit?
No Unless Gravity is in effect it will not hit Rotom Fan I tested it out here
Seen here