I think an earworm and an auditory hallucination must be 2 different things. So, being a scientist I looked up your claim and found things like this abstract:
A case of idiopathic musical hallucination with increasing repertoire
M Satoh, M Kokubo, S Kuzuhara
"Musical hallucination is defined as a type of auditory hallucination characterised by the perception of music without an external source. Reports in the literature state that musical hallucinations are common in women, and are associated with ageing, deafness, brain diseases (epilepsy, tumour, stroke, meningitis and neurosyphilis), psychiatric diseases (schizophrenia and manic depression), toxic states (alcohol) and drugs (antidepressants, salicylate, quinine and aspirin). Some authors proposed that, when listening to music, the auditory input is processed by three stages, operating in a hierarchical fashion: perception of individual sounds, perception or imagery of pattern in segmented sound, and encoding or recognition of patterned segmented sound. It is supposed that musical hallucinations are caused by abnormal autonomous activity in the auditory brain systems responsible for normal musical imagery."
Still not convinced that it's the same thing, or is it