My understanding (though as you pointed out, it's a law being considered and hasn't officially passed yet...though I believe it will) is it is for all non-EU buyers, regardless of what the property will be used for.
Spain is already clamping down on rental properties, so those are being done away with, bit by by, via other passed legislation. It's likely difficult to prove intent on buying a home. Some countries do require you to remain inside the country for a minimum amount of time every year in order to qualify for the desired visa...so it's possible Spain implements something like this (which more or less prevents you from renting the property out). But based on Spain junking the golden real estate investment visa, I think this is for every non-EU citizen, no matter what.