Look for valve cover gasket leakage. You'll likely have to pull the plastic cover off to do so, but make sure you look in the area around the rear-most spark plugs; in fact, pull the driver's side rear plug and take a look if you can. If you see oil, figure on gasket replacement.
Look to see whether the radiator and water pump have ever been replaced. If not, you're looking at a ticking time bomb. On my '99, the upper hose was stamped wih a "1Q01" date, so I knew mine had been reworked sometime in 2001.
As you drive, check for any vibration or shakes. Sometimes vibration can be due to things other than tire balance, and on these cars can require costly suspension bushing replacement.
Make sure all of the dash display pixels work. If not, BMWNA will supply a new module for free but you have to foot the labor.
If it's coming due soon for Inspection I or II service, knock another $300 to $500 off for that.
Make sure the A/C compressor isn't rattling when the A/C is on and that the AC blows cold. As I write this, I am getting my A/C compressor replaced at the dealer to the tune of $1400. You'll want to avoid that if you can!
Look for obvious signs of brake fluid leakage at the calipers. Otherwise, the brakes are relatively easy to work on so don't worry a lot about those.
Make sure you roll all windows down and back up a couple of times. Window regulators (especially rear ones) fail with regularity on these cars.
Finally, check out
www.540i6.com and "They All Do That"/common problems and fixes and be on the lookout for the stuff mentioned there.
Most of all, go to your local dealer and other sellers and drive as many of these as you can so you get a feel for what options/colors you like and don't like.
PS - It's difficult to tell if the clutch is nearing replacement time. Pedal travel is engineered to not change over the life of the clutch. Further, the clutch is not very robust and can slip if you abuse it, yet still have plenty of wear left. Since the flywheel usually must be replaced on these cars at clutch replacement, said job is usually $1500 to $2000 or more. So just make sure the clutch isn't slipping obviously: try putting it in 3rd and braking to a stop without pushing the clutch pedal in. If the car doesn't stall, it's time for a new clutch. I am at 129K+ miles and still on my original clutch and doing fine, so if that 540 hasn't been abused you could still have life left in that clutch.