  We consider the dynamics of an isolated quantum many-body system after a
sudden change of one control parameter, focusing on the statistics of the work
done. We establish a connection between the generating function of the
distribution of the work and the partition function of a classical system in a
film geometry. Using this connection, we first show that the scaling of the
fidelity susceptibilities close to a quantum phase transition can be understood
in terms of the critical behavior of the excess entropy and specific heat in
the classical model. Remarkably, we show that the statistics of the work close
to the threshold and to criticality is connected to the so-called critical
Casimir free energy which is responsible for the interaction between the
boundaries of the classical system. On the basis of this relation, we highlight
the emerging universal features of the statistics of the work. Our findings are
exemplified for a global quench of the transverse Ising chain at zero
temperature.
