Least squares estimation: beyond Gaussian regression models