Meta-learning of shared linear representations beyond well-specified linear regression