This is a very good question. When the number of candidate predictors $p$ is more than the effective sample size $n$, and one does not place any restrictions on the regression coefficients (e.g., one is not using shrinkage, a.k.a. penalized maximum likelihood estimation or regularization), the situation is hopeless. I say that for several reasons including
- If you think about the number of non-redundant linear combination of variables that can be analyzed, this number is $\leq \min(n, p)$. For example you can't even compute, much less trust, principal components beyond $\min(n, p)$.
- With $p = n$ and no two $y$-coordinates on a vertical line when plotting $(x, y)$, one can achieve $R^{2}=1.0$ for any dataset even if the true population $R^2$ is 0.0.
- If you use any feature selection algorithm such as dreaded stepwise regression models, the list of features "selected" will essentially be a random set of features with no hope of replicating in another sample. This is especially true if there are correlations among the candidate features, e.g., co-linearity.
- The value of $n$ needed to estimate with decent precision a single correlation coefficient between two variables is about 400. See here.
In general, a study that intends to analyze 45 variables on 45 subjects is poorly planned, and the only ways to rescue it that I know of are
- Pre-specify one or two predictors to analyze and ignore the rest
- Use penalized estimation such as ridge regression to fit all the variables but take the coefficients with a grain of salt (heavy discounting)
- Use data reduction, e.g., principal components, variable clustering, sparse principal components (my favorite) as discussed in my RMS book and course notes. This involves combining variables that are hard to separate, and not trying to estimate separate effects for them. For $n=45$ you may only get by with 2 collapsed scores for playing against $y$. Data reduction (unsupervised learning) is more interpretable than most other methods.
A technical detail: if you use one of the best combination variable selection/penalization methods such as lasso or elastic net you can lower the chance of overfitting but will ultimately be disappointed that the list of selected features is highly unstable and will not replicate in other datasets.