We study the large deviations statistics of the intensive work done by changing globally a control parameter in a thermally isolated quantum many-body system. We show that, upon approaching a critical point, large deviations well below the mean work display universal features related to the critical Casimir effect in the corresponding classical system. Large deviations well above the mean are, instead, of quantum nature and not captured by the quantum-to-classical correspondence. For a bosonic system we show that in this latter regime a transition from exponential to power-law statistics, analogous to the equilibrium Bose-Einstein condensation, may occur depending on the parameters of the quench and on the spatial dimensionality.