Where did the terms QNE, QNH, and QFE come from?
QNE, QNH, and QFE are Q Codes - the Q Codes are designed for telegraph (or radiotelegraph) use where information is transmitted in morse code and brevity is essential (e.g. "QNH KJFK 2992 INS" is much shorter to tap out in morse code than "JFK Altimeter 29.92 inches of mercury")

They are still used in verbal communication (radiotelephone), though much less frequently.
ICAO defines a list of standard Q codes for use in aviation (this site has a list).



Regarding the choice of Q as the prefix for these codes, this is to avoid confusion with station callsigns. The ITU currently will not assign prefixes beginning with Q to any country.
(There may be further historical reasons behind the choice of "Q", but I'm not aware of any.)