If it's a W163 ML500, it will have M113 engine, they're pretty bombproof. No experience of this model personally, but they are well regarded. High Peak Autos has done several videos about the various versions available.
If it's the W164, then it's the same basic model that I ran through last winter, and it will have the M273 engine, they're also pretty decent, it's what I have in the S Class, but research the timing chain idler gear issue. It's a relatively easy fix on the V8, essentially the same as the balance shaft issue on the M272 V6 but without the balance shaft or engine removal rebuild required to fix it. It's not a deal breaker, as it's only about £400 in parts to fix and involves replacing the chain and idler gear. There's plenty of info online about it including the engine number ranges affected but any M272/273 from 2004 to 2006/7 could be affected.
Gearbox is pretty tough but expect to replace the conductor plate at some point on ANY 722.9 transmission.
4 matic part is the transfer box. Chain slap under load requires a new chain. But the chain is generally the only weak point, rest of the transfer case is solid. If it sounds like a rattling gun when you stp on it, this is going to be the chain stretching.
Rear underbody corrosion, better than a RR, but still something to look for.
Early cars with factory towbar have a removable tow ball, later cars have a folding one.
Water leaks, especially around the rear of the car can cause random electrical issues. Better that a RR, but can be annoying to track down and all point to water in the rear SAM/body control module. Later cars, this is moved from the side of the boot to under the rear seat and much more reliable.
ML500 will have Airmatic suspension all round. More reliable than the RR. Can be retrofitted with standard springs all round. Off road pack adds locking diffs x3 and low range selector on transfer box. Will give a RR a run for its money in most conditions.
Sport trim is pretty meh, get full leather if you can as it will be a much nicer place to be, or for dog purposes, Artico synthetic leather aka vinyl...
From my 8 months or so with an '07 ML280 diesel, it's a stout car, drives well enough, is comfortable with plenty of room.
Petrol cars are more reliable than the diesels but expect 20mpg instead of ~30mpg.
If it were my money, I would look for a post 2008 facelift car as they're better electronically speaking.
For an idea of service costs, trans service is £180 in parts and about the same for labour.
Diff/transfer box service is about £100 in fluids.
Full engine service, all filters and plugs will be £350 in parts and probably the same in labour.
Oil and filter change alone is ~£100 plus labour.
Decent tyres for the 19" wheels are £160 or so each. Had Goodyear Vector 4 season on mine and it suited the car well for day to day use with a road bias.
They're pretty easy to work on from a mechanical perspective and Mercedes service parts are readily available and reasonably priced.
Not as flashy as a RR, but less finickety and won't leave you wondering if it will start.
GL is the bigger version, but fundamentally the same running gear.