You will never regret getting an e39, definitely one of the best cars I have ever owned and still miss my old one.

Engine wise the 530d are fairly bullet proof, they have common issues however, thermostats and coolant system are a common issue, engine mounts tend to go due to the torque. But once the car has been maintained they are great cars.

Other e39 issues are.
Rust,
sills, rear arches and boot lid. Even well looked after cars will rust.

Suspension.
Ball joints, drop links etc tend to go more that an e36 due to the sheer weight of the car.