We study the Casimir torque between two metallic one-dimensional gratings rotated by an angle $theta$ with respect to each other. We find that, for infinitely extended gratings, the Casimir energy is anomalously discontinuous at $theta=0$, due to a critical zero-order geometric transition between a 2D- and a 1D-periodic system. This transition is a peculiarity of the grating geometry and does not exist for intrinsically anisotropic materials. As a remarkable practical consequence, for finite-size gratings, the torque per area can reach extremely large values, increasing without bounds with the size of the system. We show that for finite gratings with only 10 period repetitions, the maximum torque is already 60 times larger than the one predicted in the case of infinite gratings. These findings pave the way to the design of a contactless quantum vacuum torsional spring, with possible relevance to micro- and nano-mechanical devices.