We establish precise spectral criteria for potential functions V V of reflectionless Schrödinger operators L V = − ∂ x 2 + V L_V = -\partial _x^2 + V to admit solutions to the Korteweg–de Vries (KdV) hierarchy with V V as an initial value. More generally, our methods extend the classical study of algebro-geometric solutions for the KdV hierarchy to noncompact Riemann surfaces by defining generalized Abelian integrals and analogues of the Baker-Akhiezer function on infinitely connected domains with a uniformly thick boundary satisfying a fractional moment condition.