I saw a nice 03 M Sport a while back. Asking 9k. There seems to be a huge range on the auto trader. I was only interested in manual trans though, which strangely is very rare lately.
I sold my 97 540-6 about 5 yrs ago for 9k. It had 298,000km on it and it was running strong as ever. Never burned or leaked a drop of oil. Never experienced those traditional failures like the blown rad etc...I maintained it myself and it was in great condition. I didn't want to sell it but I was given a company car. That car was awesome to me and NEVER let me down. Like I said, I regularly checked it and replaced parts before they became a problem.
Eurostyle has the right idea. You could buy a cheaper one and take a gamble. You save a lot of dough that could be used for repairs....or not... I don't necessarily agree with the time bomb. Keep up with maintenance and spot problems before they get serious. The motor is so strong that it's hardly working under normal driving conditions.
Read the "typical E39 fix it" and E39 typical problems stuff on the web to get an idea. But seriously, how else can you get a RWD, 6 speed stick with almost 300 HP? A smaller Caddy CTS-V? My E39 experience was so awesome that I just got another one.... M5 this time.... I luv it! Except the Summer tires suck in the snow....