Understanding Forgetting in Continual Learning with Linear Regression