Question: To me, "over easy" seems to refer to the pan, because I think of a pan sitting atop an easy flame. "Over hard" makes me think it refers to the egg, because the liquid becomes solid. Then again, maybe it's something else altogether.

Answer: 
I'm pretty sure that "over hard" came first: it's [diner jargon](http://en.wikipedia.org/wiki/Diner_lingo) that the eggs should be flipped **over** and cooked until they are **hard**. Now if you want it flipped but not hard, well the opposite of hard is **easy**, right? (Sure, you could say soft or runny, but diner slang is often supposed to be funny, a bit of an in-joke, and opaque.)
These terms refer to the egg, namely to its degree of cooked-ness: *over-easy* is cooked on both sides but yolk is runny; *over-medium* is less runny than over-easy, and *over-hard* is when both the yolk and white is cooked all the way through.