I’d say that the HRM-5 gives the “flattest” raw response out of the three, in spite of a touch of grain in the treble. The M50X and the HRM-6 are both just a touch more aggressive in the bass response.
Of course, the M50X hews really close to the Harman Response Target, so it might depend on your personal definition of “flat.”
I get into the differences between the HRM-5 and 6 a bit in my review…
But basically, the build of the 6 is much nicer and the drivers are bigger, and differently-tuned.