the term has many meanings, but i think the way you are describing it, the phrase otaku refers to someone who "has no social life" or "no love life" and usually stays in their house most of the time, so of course the anime characters would find it insulting be be called that, but when they are referring to themselves it is alright. its a bit like if i said I'm anti-social. i do not know the direct translation into English, but i hope this helps, and also, i don't think it was a term made up in English.