520s are great, I have a couple of pairs which are 10+ years old and require very little maintenance. Have a fair bit of surface rust now.
540s are (surprisingly) a bit nicer. Nicer machining and spanner flats for servicing. No rust. There is a different engagement vs 520, slightly more ‘clunk’ than ‘click’ but they’re not better – just different. Plus, this might just be my pair.
XTs (785 era IIRC) feel the same IMO as 540s. They are machined to look fancier but I’ve never noticed any other difference.
XTRs make me feel warm and like I’ve won at life. Could I actually feel the difference over 540s? I wouldn’t like to do a blind test! They’re also the only ones I’ve had to service more than once a decade, and the only ones that I’ve ever managed to break (Hit them hard on a rock, repeatedly).
Shimano SPD pedals are flipping brilliant, really.