This sounds painful. Is it an Infection or an allergic reaction? I doubt it's a real ear infection unless there was something nasty on the headphones that managed to get inside your ear canal.
I never use the headphones provided by the airline and travel with my own NC headphones.