Climate change and seasonality: modelling ecological and epidemiological systems with time-varying components