This paper presents a spectral approach to the uncertainty management in epidemic models through the formulation of chance-constrained stochastic optimal control problems. Specifically, a statistical moment-based polynomial expansion is used to calculate surrogate models of the stochastic state variables of the problem that allow for the efficient computation of their main statistics as well as their marginal and joint probability density functions at each time instant, which enable the uncertainty management in the epidemic model. Moreover, the surrogate models are employed to perform the corresponding sensitivity and risk analyses. The proposed methodology provides the designers of the optimal control policies with the capability to increase the predictability of the outcomes by adding suitable chance constraints to the epidemic model and formulating a proper cost functional. The chance-constrained optimal control of a COVID-19 epidemic model is considered in order to illustrate the practical application of the proposed methodology.