Aims. Accretion rates in low-mass protostars can be highly variable in time. Each accretion burst is accompanied by a temporary increase in luminosity, heating up the circumstellar envelope and altering the chemical composition of the gas and dust. This paper aims to study such chemical effects and discusses the feasibility of using molecular spectroscopy as a tracer of episodic accretion rates and timescales. Methods. We simulate a strong accretion burst in a diverse sample of 25 spherical envelope models by increasing the luminosity to 100 times the observed value. Using a comprehensive gas-grain network, we follow the chemical evolution during the burst and for up to 10 5 yr after the system returns to quiescence. The resulting abundance profiles are fed into a line radiative transfer code to simulate rotational spectra of C 18 O, HCO + , H 13 CO + , and N 2 H + at a series of time steps. We compare these spectra to observations taken from the literature and to previously unpublished data of HCO + and N 2 H + 6−5 from the Herschel Space Observatory. Results. The bursts are strong enough to evaporate CO throughout the envelope, which in turn enhances the abundance of HCO + and reduces that of N 2 H + . After the burst, it takes 10 3 -10 4 yr for CO to refreeze and for HCO + and N 2 H + to return to normal. The H 2 O snowline expands outwards by a factor of ∼10 during the burst; afterwards, it contracts again on a timescale of 10 2 -10 3 yr. The chemical effects of the burst remain visible in the rotational spectra for as long as 10 5 yr after the burst has ended, highlighting the importance of considering luminosity variations when analyzing molecular line observations in protostars. The spherical models are currently not accurate enough to derive robust timescales from single-dish observations. As follow-up work, we suggest that the models be calibrated against spatially resolved observations in order to identify the best tracers to be used for statistically significant source samples.