I'm not sure if this is related to my hearing loss, or if anyone else has noticed it, but I find it easier to hear higher frequency sounds coming out of a speaker that I hold up against my ear versus wearing earbuds where I would most likely hear the lower frequency but miss the high ones.
The frequency responses of an earbud closely-coupled to your ear and an external speaker radiating towards your ear in its acoustic near-field will be quite different. It would be unusual for both of them to actually sound the same to your ear.
Normally, an earphone-like device will feed low frequencies more effectively to your ear than an external speaker because of that close-coupling, as you note- so the problem is either in the signal which is driving the earbuds (deficient in treble) or the earbuds themselves are bad at reproducing treble. Because they are naturally good at radiating very high frequencies (because their radiating cone area is very small, as is their mass), there could be something wrong with the earbuds (cheap, as suggested by safesphere) but I would also check the output of the device the earbuds are plugged into.