Depends on condition. No different than getting anything that's used- there's always unknowns. Not sure why you picked 2004-2005 as there were no 2004 CDIs in North America (or maybe just the US?). My understanding, from a US perspective, is that it's 2005-2006.
I've bought TWO high mileage CDIs. My "keeper," the 2005, had about 196k miles on it (see the video I linked below). The donor/parts car -"a 2006"- had 220k miles on it but the engine was a replacement (one of the rare cases in which an om648 had died- some quick lube place forgot to put oil in the original engine) and had less mileage (I estimate it at somewhere between 150k to 175k miles).
om648s are great engines and mileage matters little to them: have run across many listings of these cars with 400k and even 500k miles. HPFP is solid: CP3. Injector seals are about the only known weak spot and these can be managed with little effort (assuming things haven't gotten out of hand- Black Death [which had occurred on the original engine in my car]). Higher mileage ones will be facing the need to new injectors (or Bosch remans); this is just a fact of life with all Common Rail engines. Timing chains last almost the life of the engines. Intake swirl flaps and motors are also a bit of a problem but these can be readily dealt with: as I have engines pulled I decied to pick up an intake w/o swirl flaps in which case I don't have to worry about this. Here's how the engine I pulled from my car ran just before I pulled it with 197k miles:
Original engine. Bad glow plug (trashed hole in head- sneaky dealer hid). Undecided what to do with this engine: find a replacement head and rebuild or jus...
www.youtube.com
Body and interior components are really pretty good on these cars. Note that my car came from Chicago and if you look at the pics you'll see that it held up remarkably well: it was, however, garaged but the owner likely didn't garage it at his work. The electronics is pretty typical German, ugh. Perhaps the biggest concern. I had to replace the control module on my passenger side Dynamics seat: easy job and a used module was cheap off ebay. Downside is CANbus. Upside is CANBus- good diag tools can dig out lots of info. Suspension bits aren't much different than with VWs- these MBs seem to chew up suspension bits just as readily: working on them is fairly easy and parts costs isn't bad. These cars also eat tires; not real bad but it's something to keep in mind; it's really the price of owning something like this; 16" tires aren't too costly (keep the stock rim/wheel size as this is important to retain the ride quality- if you butcher the ride quality then why would you want one of these cars? ride quality is the point!).
Regarding standard maintenance, really not a lot different than with the TDIs. I believe oil change intervals is even longer than with the ALHs: can also do everything top-side. More oil. More expense. Bigger engine: I've got mine tuned and it's really pretty quick and fast given it's a 3.2L diesel lugging around a large car like this. The 722.6 transmission is proven to be one of the best ones ever put on the road: only a 5spd but these diesels match up with them really well (no issues with hunting gears such as is common with newer slush boxes with gobs of gears). Electrical connector socket is an item that needs regular maintenance; a $25 part that is best replaced when changing trans fluid and filter (I think 60k miles is a good interval). The electrical conductor plates [transmission] are known to eventually fail; realtively cheap and easy to replace (I preemptively replaced mine while I was changing the fluide and filter; unlikely I'll ever have an issue with it).
My CDI has split/folding rear seats. Coming from a VW Golf I felt I really need to be able to have such flexability: stow gear and haul my big dog! I estimate that _maybe_ 10% of these CDIs came with this option: lots of gassers had them. Range is a good 700 miles. Fuel economy for me, so far, and this includes a bit of hammering on it to sort things out (car will hit 100 mph without a sweat), is about 35 mpg: I'm convinved that out on the open road I'll be able to do close to 40 mpg. With the ride comfort this is an amazing package; nothing else really out there can compare.