Rear light clusters in the boot lid leaks water in the lights and eventually rusts the innards. Revised seals on later model can be retrofitted.
Sunroof - yes I have issues there as well.
Wheel bearing failure common (one of my rears just gone) ::)
7 Seaters have rear air suspension - recently replaced the air springs on mine
I think these are fairly common issues with the car and can be resolved but check the history to see if any have been done already.
They do handle well for a big motor though. I did think the ride on the M Sport was hash but switching to non-run flats helped although since buying a Z4M the X5 ride just feels very comfortable now thanks!