  We study the crossover from low- to high-temperature fluctuations including
critical fluctuations in confined isotropic O$(n)$-symmetric systems on the
basis of a finite-size renormalization-group approach at fixed dimension $d$
introduced previously [V. Dohm, Phys. Rev. Lett. {\bf 110}, 107207 (2013)]. Our
theory is formulated within the $\varphi^4$ lattice model in a $d$-dimensional
block geometry with periodic boundary conditions. We derive the finite-size
scaling functions $F^{\text ex}$ and $X$ of the excess free energy density and
of the thermodynamic Casimir force, respectively, for $1\leq n \leq \infty$,
$2<d<4$. Applications are given for $ L_\parallel^{d-1} \times L$ slab
geometries with a finite aspect ratio $\rho=L/L_\parallel$ as well as for the
film limit $\rho \to 0$ at fixed $L$. For $n=1$ and $\rho=0$ the
low-temperature limits of $F^{\text ex}$ and $X$ vanish whereas they are finite
for $n\geq 2$ and $\rho = 0$ due to the effect of the Goldstone modes. For
$n=1$ and $\rho>0$ we find a finite low-temperature limit of $F^{\text ex}$
which deviates from that of the the Ising model. We attribute this deviation to
the nonuniversal difference between the $\varphi^4$ model with continuous
variables $\varphi$ and the Ising model with discrete spin variables $s=\pm1$.
For $n\geq 2$ and $\rho>0$, a logarithmic divergence of $F^{\text ex}$ in the
low-temperature limit is predicted, in excellent agreement with Monte Carlo
(MC) data for the $d=3$ $XY$ model. For $2\leq n \leq \infty$ and $0\leq
\rho<\rho_0=0.8567$ the Goldstone modes generate a negative (attractive)
low-temperature Casimir force that vanishes for $\rho = \rho_0$ and becomes
positive (repulsive) for $\rho > \rho_0$. Our predictions are compared with MC
data for Ising, $XY$, and Heisenberg models in slab geometries with
$0.01\leq\rho\leq1$. Good overall agreement is found.
