If you look a little further in your Etymonline reference, you see that unearthly acquired its pejorative usage around 1802:
Sense of "ghostly, weird" first recorded 1802.
Partridge records the first reference of an unearthly time from 1865.
I can find no citation to explain these particular transformations, but you should remember that unearthly also easily describes things that are ungodly. Beings that were not considered to be part of this world were in the domain of the "spirit world" — which is believed to exist by some even today, and which includes the malicious as well as the sublime.