It's a commons problem. In your scenario, you have absolutely increased the value of your property. 20 apartments is more valuable than a single family home. However, you have also reduced aggregate demand by housing 20 people. That reduced the value of your neighbors' properties (or at least reduced the rate at which their value increased).
NIMBYism posits that values will continue to increase without forcing any property owners to invest in improvements so long as they collectively block any efforts to increase supply.