Of course with a E39 you will have repair bills, probably some rust / bodywork to attend to since the very last cars off the production line are nearing 20 years old.
But with that said, it's an E39 M5 (some might say a dinosaur) which is an awesome machine, pretty rare, amazing naturally aspirated engine and stunning in my eyes.
As has been said above, the values of the E39 M5 are only go one way at the moment so if you want to sell, now would be a good time.