To be accurate, "$X = UDV^T$" is not the "eigendecomposition", but "singular value decomposition (SVD)" of $X$. And with this SVD of $X$, it must be made clear that the size of $D$ is $n \times p$ (assuming $X$ is $n \times p$), and $U$ and $V$ are order $n$ and order $p$ orthogonal matrix respectively. So the notation "$D^{-2}$" does not make sense (unless you are using the "Thin SVD" in which $U$ is $n \times p$ and $D$ is $p \times p$ as opposed to the common "Full SVD" as above). The correct way is expressing $D$ as $D = \begin{bmatrix}\Lambda \\ 0\end{bmatrix}$, where $\Lambda = \operatorname{diag}(\sigma_1, \ldots, \sigma_p)$ is an order $p$ diagonal matrix with $\sigma_1 \geq \cdots \geq \sigma_p > 0$ (which are called singular values of $X$. The relationship between the eigenvalues $\lambda_j$,
$1 \leq j \leq p$ of the matrix $X^TX$ and $\sigma_j$ are given by $\lambda_j = \sigma_j^2$). Therefore, the true distribution of $\hat{\beta}$ is
\begin{align}
\hat{\beta} \sim N_p(0, \sigma^2V\Lambda^{-2}V^T),
\end{align}
which implies that $\sigma^{-1}\hat{\beta} \overset{d}{=} A\xi$, where $\xi \sim N_p(0, I_{(p)})$ and $A$ satisfies $A^2 = V\Lambda^{-2}V^T$. In addition, since $V$ is an order $p$ orthogonal matrix, $V^T\xi := W \sim N_p(0, I_{(p)})$. It then follows that
\begin{align}
\sigma^{-2}\|\hat{\beta}\|^2 \overset{d}{=} \xi^TA^2\xi = \xi^TV\Lambda^{-2}V^T\xi = W^T\Lambda^{-2}W = \sum_{j = 1}^p\sigma_j^{-2}W_j^2 = \sum_{j = 1}^p\lambda_j^{-1}W_j^2.
\end{align}
Therefore, the result you presented is incorrect in that:
- There are $p$ summands, not $n - p$ summands. To see this more clearly, just consider the simplest $X = \begin{bmatrix}I_{(p)} \\ 0\end{bmatrix}$, for which case $\hat{\beta} \sim N_p(0, \sigma^2I_{(p)})$.
- $\lambda_j$ is the eigenvalue of $X^TX$, not of $X$. In fact, as a rectangular matrix, it is impossible for $X$ to have eigenvalues.