If vacating a condo (for context, high floor apartment-style unit in hi-rise) that will not be used for quite a while, is it ok to shut off it's water for as long as TWO YEARS?
There's nothing wrong with shutting off the water for that length of time provided you take the proper precautions. The water in all your traps for the sinks, toilets and showers will evaporate and allow sewer gas and bugs to get into your condo. They should be adequately sealed to prevent this. If you have a water heater, you should drain it and shut off the breaker if it's electric. Drain the water from your fridge, and very importantly use tape or something else to ensure the door is slightly ajar the entire time (otherwise you get terrible stink).
Have your maintenance department shut off the water from outside your unit so a leaky valve won't be your problem.
Or, hire a management company and let it be listed on AirBnB.