I would rather compare XB500 to LP2 as these are quite similar and Q40 to HTF600.
First some quick subjective sound quality price rating of the 4:
XB500: Stock: $50~$60 - With EQ: $120
HTF600: Stock: ~$100 - With EQ+mods: ~$140
LP2: Stock: ~$70 - With EQ: 120~$130
Q40: Stock: ~$150 - With EQ+mods: 170~$180
LP2 and XB500 are fairly similar sounding headphones, both have about the strongest bass response with the biggest impact you'll find, the LP2 seems to possibly have even slightly stronger midbass punch but slightly less subbass impact than XB500 but yea both seems to be about a ~15dB boost in near the whole bass range which is about as much as you'll probably ever gonna find. As a result the mids and highs do get pushed a bit backwards compared to the bass response, the mids are possibly slightly more forward sounding on LP2 so it's slightly less smooth or "muddy" sounding but it's very unevenly so and the tonality of female vocals is possibly slightly more off sounding on LP2 (the XB500 have slightly the same issue but it's more present so on LP2) due to upper-mids being slightly more forward. The highs are even more recessed on LP2 compared to XB500 and XB500 is already on the recessed side, for the cost of the LP2 the recessed highs is too much for me to accept (had to boost 3.5 ~ 5.5dB at 8 - 16kHz). The bass response I'd say is tiny bit better quality in the LP2, the XB500's bass response is slightly more loose & uncontrolled. Soundstage is about average on both, the LP2 is a bit more forward/in-your-face sounding, the XB500 somewhat airier. XB500 are comfier but LP2 have excellent build quality (XB500 still feels great too).
The HTF600 compared to above headphones has slightly less bass response, while the above have around 15dB boost the HTF600 maybe peaks around 10dB but rolls-off a bit further in the subbass. The mids are much more forward and much more even and clear and detailed than above headphones and the highs as well, the highs still remain slightly recessed/veiled but only ever so slightly and you can bring them out more by removing the foam covering the driver to where it wouldn't really sound recessed anymore. The bass is also more controlled than above, slightly more textured than XB500, about same as LP2. Soundstage is also better than on LP2/XB500, especially imaging/positioning is great for the price. It's still a very smooth/warm sounding headphone despite being more detailed unless removing the foam. The build quality is poor though as described here the left driver might quite easily get stuck in wrong position so you have to blow towards the driver to get it back into position and the pads aren't very good, they get sweaty easily but you can exchange them for example the Beyer EDT 200/250 velour pads.
The Q40 is compared to HTF600 even more textured, accurate, controlled in the bass response while being just tiny bit stronger (we're probably only talking like 1~1.5dB across the bass range) and it's better separated from the mids. The mids and highs are very neutral and well balanced across the whole range, by far the best out of all these headphones and doesn't need any EQing for my ears (well if picky perhaps +1dB at 500~1kHz and 31Hz but heh that's a barely audible change and nothing compared to the EQing the other headphones needed for me). The mids and highs are more detailed compared to HTF600 but the lower mids may ever be so slightly more forward sounding on HTF600 but the Q40 have more neutral sounding mids. The Q40 have a lot better resolution in the highs than HTF600 and the other headphones. Only the soundstage it may slightly lose compared to HTF600 but it's not a huge difference especially after doing the simple mod to stuff something underneath the pads so the cups gets deeper. No problems with comfort or sweat with these, the pads are low quality pleather pads that typically will start to fall apart after like 2-3 years or so of use though but I heard the BeyerDynamic DT770 pads will fit these (imagine putting the Gel pads on these! might be something I have to look into in future).
EQ Settings comparision:
XB500:
LP2:
HTF600:
Q40 (Not necessary but possibly):