The only real example's for compison are E28's; how much would a manual gearbox E28 535i be worth in comparison to an E28 M5 or E28 Alpina B9 3.5?
The answer sadly, even if it was low mileage and excellent condition like your E34 example, is nowhere near as much as the flagship cars.
Please don't anyone think I am dismissing the desirability or dynamic ability and enjoyment you can get from an E34 540i or E28 (or E34) 535i as they are all great cars, but you asked about its value and the market is what it is and knows what it likes. I know from my own experience that I would still own my E34 540i/6 Touring to this day had it not been written off because it did everything so very well, and the number of E28 based 635CSi's I have owned would be dynamically no different from the E28 cars themselves.
As for rarity, I recall there were just 64 rhd manual gearbox E34 540i Tourings and I think about four times as many saloons so perhaps a few hundred, but those numbers would have diminished significantly as collectors sought to save the flagship/premium models in preference.
IMHO the only real value in a model lower down the range is in keeping it ultra-low mileage, almost time-warp immaculate original condition and then in a few years hoping you find someone that feels the same as you do... and is willing to pay a premium to keep it in exactly the same ultra-low mileage immaculate original condition. In short, it has to become a complete garage queen for any amount of miles reduces its value...