I am sitting here, wanting to reply to this post, and then it hit me: I don't know which one I would choose.
The e46 might be cheaper to maintain yes, and these days parts are a dime a dozen from scrapyards. I am not so sure about the e39. Then again the e39 is bigger, with a very nice size boot, and more comfy.
Me personally, I love the e46 330i, but if I had the choice today, I would opt for the e39 (family of 4, having to cart the pram around etc.)
But... but... the e46 is such an involving drive..... ooohhhhh, I am so glad I don't have to choose.