  We study the optimal sets $\Omega^\ast\subset\mathbb{R}^d$ for spectral
functionals $F\big(\lambda_1(\Omega),\dots,\lambda_p(\Omega)\big)$, which are
bi-Lipschitz with respect to each of the eigenvalues
$\lambda_1(\Omega),\dots,\lambda_p(\Omega)$ of the Dirichlet Laplacian on
$\Omega$, a prototype being the problem $$ \min{\big\{\lambda_1(\Omega)+\dots+
\lambda_p(\Omega)\;:\;\Omega\subset\mathbb{R}^d,\ |\Omega|=1\big\}}. $$ We
prove the Lipschitz regularity of the eigenfunctions $u_1,\dots,u_p$ of the
Dirichlet Laplacian on the optimal set $\Omega^*$ and, as a corollary, we
deduce that $\Omega^*$ is open. For functionals depending only on a generic
subset of the spectrum, as for example $\lambda_k(\Omega)$ or
$\lambda_{k_1}(\Omega)+\dots+\lambda_{k_p}(\Omega)$, our result proves only the
existence of a Lipschitz continuous eigenfunction in correspondence to each of
the eigenvalues involved.
