Coming from someone who owned a 540 sport - NO. RUN.
The 540 has the old recirc ball steering box while the 530 had the newer and much better rack and pinion. A steering box, IF you can find one, $2k+. Many people tighten up the adjusting bolt just to sell the car. It will loosen up in a couple thousand miles, if that.
Front suspension parts are incredibly expensive if you get good ones, and they will need replaced often. I believe I paid around $3k in non-bmw decent quality parts to rebuild mine. The suspension really (in my opinion) was designed for the lighter i6. The extra weight of the v8 takes its toll. There are tons of chinese crap quality parts, most people use these just to limp the car along to sell it.
The 540 has major known vanos issues, and they are FAR more difficult to replace than the 530. It takes some outrageous amount of time, like 15 shop hours to replace vanos seals. The cheapest DIY options are $3k++ in parts since you should replace the chain/guides while doing vanos. Also need special BMW timing tools. Most DIY vanos articles for the v8 say prepare for 20+ hours of labor.
The vanos issues makes these cars ticking time bombs. They also have some known timing chain problems.
If you're going to take all of these insane risks you might as well cough up the $$ and get an e39 m5. Then instead of $5k+ vanos repairs you're looking at $6k+ carbon build up repairs.
The only exception is the ~97-~2000 540i v8 that was non-vanos. But good luck finding one that is not thrashed to hell and back. And you still have junk front suspension, recirc ball steering..
A better option in that price range is the 04-07 cts-v. That way you're only worried about a $1500 exploding rear end.
You are probably right that if you are considering a 540, for the amount of personal maintenance you should expect to put in you're better up just ponying up a few k more for an M5. You're also correct that for this poster, he probably is much better off with a CTS-V.
As far as the issues you're brining up...
I thought the 540 and M5 had the same steering box, and I've never heard any real bitching from the M5 community about that going bad.
No comment on 540 suspension. As far as the M5 goes, it's not too bad, I just hope you like replacing bushings.
I think VANOS issues are typically grossly overstated and can be addressed much easier than the full replacement nightmare scenario most people jump to. The majority of all VANOS issues can be addressed by repairing/replacing the solenoids which is significantly less work.
Carbon buildup can be ignored with a $600 DME flash (plus you get all the other DME flash features and a performance boost).
All this said, I don't think either car is a good option right now for OP. It's probably impossible to find a 530/540 with low enough miles to mitigate the maintenance costs and an M5 in that category will be outside his budget. Either way these are still 15 year old cars so you'll likely have to tackle some maintenance items no matter the mileage.