You are misunderstanding what is going on. Most (all?) "compressed air" cans do not contain compressed air, they contain a pressurized liquid hydrocarbon - with some gas on top - similar to propane. When you open the valve on the can, the little bit of gaseous hydrocarbon comes out and the pressure drops in the can, causing the remaining liquid to boil. As the remaining liquid boils, its temperature drops until it reaches the boiling temperature of the hydrocarbon at the new, lower pressure.
So the water in your cup freezes not due to adiabatic expansion of air through a valve, but rather through the lost latent heat of vaporization of a boiling hydrocarbon.