Text this: On the connection between least squares, regularization, and classical shadows