But still I absolutely love the sound of the D. But like you say the acoustic might be different from the hall or the studio.
I would buy the piano you love the sound of most. If I felt like that I would go for a D, and look long and hard to get the right one, with a view to moving house if it didn't work out sound wise. I would definitely get the piano first though.
Once you get the right piano and bond with it a little, you should know if it is worth investing any more effort into. Will you have problems bonding with a nice D, might you have problems with a B? Additionally I don't like the feel of the keys on the latest M I saw (or the newer Yamahas for that matter, which seem to have copied the sharps!). I would want to see the piano first if I was buying new.
Second hand D's can be great value, as not many want to commit that much space. The touch and feel of the D, the tactile mass of it as it resonates, should be the same in any space. You might move house, or build an extension, knock some walls through to make an open plan space, put it on a large rug to stop the floor resonating, hang a decorative rug on the wall. Sound will depend on so many things, concrete or wooden floors, type of walls, curtains, ceiling height. All this without even touching the piano voicing.