The first question to ask is where does a toy price end and a model start. You can't compare one to the other. I think DCC is a dividing line, so talk about traditional engines. Regardless of brand if the motor looks like a miniature Lionel it has quality. I would rather see the motor than a brand name in HO. But staying with one brand has advantages when you junk an engine for parts.
My choice is traditional cast steam. Mantua, parts are availble. Longevity and parts are also a factor for me.
There are quite few quality manufacturers of engines. Rivarossi, Broadway Limited, Atlas, Kato, Life-Like's Proto 1000 and 2000, Bachman's Spectrum series. I would even include Athearn Blue Box. They are the best entry level engine and have good price points. I have some that are over 40 years old and still running. I am not really familiar with the European manufacturers, so I cannot venture a critique there.
One's I steer clear of are TYCO, Model Power(the little starter engines found in the starter sets), and the entry level Bachman's. I don't care for the talgo wheelset/coupler configuration that has the coupler attached to the wheelset. Such a configuration does alleviate some derailments, but just doesn't look authentic. And NO I'm mot a rivet counter, but do like some sort of realism. I model, not play with toys. A bit of a difference.
One can usually tell the difference in quality just by holding the different engines, looking at the detail, and chassis.
Only being in this for a very short time, So far, my favorite as far as detail, quality, and just plan "nice" engines (steam) is Broadway Limited. My dad, when he had HO stuff was always a big fan of AHM/Rivarossi.
Just my 2cents worth, from a "newbie"