We present a shortcut to adiabaticity (STA) protocol applicable to 3D unitary Fermi gases and 2D weakly interacting Bose gases containing defects such as vortices or solitons. Our protocol relies on a new class of exact scaling solutions in the presence of anisotropic time-dependent harmonic traps. It connects stationary states in initial and final traps having the same frequency ratios. The resulting scaling laws exhibit a universal form and also apply to the classical Boltzmann gas. The duration of the STA can be made very short so as to realize a quantum quench from one stationary state to another. When applied to an anisotropically trapped superfluid gas, the STA conserves the shape of the quantum defects hosted by the cloud, thereby acting like a perfect microscope, which sharply contrasts with their strong distortion occurring during the free expansion of the cloud.