The projection on the line is unique, but you cannot apportion it to
$X_1$ and $X_2$, which is a problem. So you cannot uniquely solve for
the coefficients on $X_1$ and $X_2$ even though you can solve for
coefficients on the line
From a linear algebra point of view, you can define the unique orthogonal projection of the vector onto the linear span of ($X_1$, $X_2$), but not find a unique way to express it as a linear combination of ($X_1$, $X_2$) since they do not form basis (not linearly independent).
Note that this does not mean linear regression is impossible. It just means that there are many solutions.
It may be a problem for interpretation. For prediction, the problem is that you can't easily extrapolate to data where $(X_1,X_2)$ would not be proportional like in the dataset. Assume $X_1=X_2$ and $Y=2X_1$ (i skip the noise for simplicity) in the training set. Some solutions are:
- $Y=X_1+X_2$ (balanced)
The last solution would give weird prediction as soon $X_1$ and $X_2$ are slightly different.
The usual method is to use regularization. $L^2$ regularization will choose the balanced solution and will avoid absurd solutions. Note that the regularized solution is always unique (the matrix is invertible).