Pretraining task diversity and the emergence of non-Bayesian in-context learning for regression