There are people far more qualified than I to speak on this issue but:
I shot the d500 underwater for the first time this weekend. I usually shoot the d810. in terms of overall image quality, there is very little difference between the two at least underwater. Like Adam said, shooting through and under water will reduce many of the typical advantages of the d810 over the d500. If I were choosing now, id go d500 over d810 for underwater shooting.
The image sharpness may be slightly better on the D810, ISO performance in real world underwater looks nearly identical. I have to look at exif data if I really wanted to know which camera took which image. I prefer full frame usually for the narrower DOF, better high ISO, and wider FOV but underwater the former two don't seem to give any advantage to the d810 vs the d500 (d5 and d4 are a different story). The d850 may perform slightly better than the d810 but will need the highest quality lenses and ports as Adam mentioned.