We study adaptive learning in economic environments subject to recurring structural change. Stochastically evolving institutional and policymaking features can be described by regime-switching models with parameters that evolve according to finite state Markov processes. We demonstrate that in nonlinear models of this form, the presence of sunspot equilibria implies two natural schemes for learning the conditional means of endogenous variables: under mean value learning, agents condition on a sunspot variable that captures the self-fulfilling serial correlation in the equilibrium, whereas under vector autoregression learning (VAR learning), the self-fulfilling serial correlation must be learned. We show that an intuitive condition ensures convergence to a regime-switching rational expectations equilibrium. However, the stability of sunspot equilibria, when they exist, depends on whether agents adopt mean value or VAR learning: coordinating on sunspot equilibria via a VAR learning rule is not possible. To illustrate these phenomena, we develop results for an overlapping-generations model and a New Keynesian model.