"inflammation of the eye, conjunctivitis," late 14c., obtalmia, from Medieval Latin obtalmia and Old French obtalmie, ultimately from Greek ophthalmia, from ophthalmos (see ophthalmo-) + -ia. The corrected spelling is attested from late 16c.
before vowels ophthalm-, word-forming element meaning "eye," mostly in plural, "the eyes," from Greek ophthalmos "eye," originally "the seeing," a word of uncertain origin. Perhaps from ōps "eye" (from PIE root *okw- "to see") + a form related to thalamos "inner room, chamber" (see thalamus), giving the whole a sense of "eye and eye socket," but Beekes rejects all this and finds it to be probably Pre-Greek.
word-forming element in names of countries, diseases, and flowers, from Latin and Greek -ia, noun ending, in Greek especially used in forming abstract nouns (typically of feminine gender); see -a (1). The classical suffix in its usual evolution (via French -ie) comes to Modern English as -y (as in familia/family, also -logy, -graphy). Compare -cy.
In paraphernalia, Mammalia, regalia, etc. it represents Latin or Greek -a (see -a (2)), plural suffix of nouns in -ium (Latin) or -ion (Greek), with formative or euphonic -i-.
Others are reading
<a href="https://www.etymonline.com/word/ophthalmia">Etymology of ophthalmia by etymonline</a>
Harper, D. (n.d.). Etymology of ophthalmia. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/ophthalmia