Heterogeneity and misspecifications in learning