Here, $X \in \mathbb{R}^{n\times d}$, $Z \in \mathbb{R}^{m \times d}$ and $A \in \mathbb{R}^{m\times m}$ and $y \in \mathbb{R}^n$. More importantly, $A$ is positive definite, and the row vectors of $X$ and $Z$ are linearly independent. I am thinking about if the span of the row vectors of $X$ and $Z$ are null space to each other? But I am not very sure about if the null space of two sets of linear independent vectors are null space to each other? Any explanations will be appreciated!
Derivation:
$(X^\top X + Z^\top A Z)^{\dagger}X^\top y $
$=\left(\begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix}^\top \begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix}\right)^{\dagger}\begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix}^\top\begin{bmatrix} y \\ 0 \end{bmatrix}$
$=\lim_{\lambda\rightarrow0} \left(\begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix}^\top \begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix} + \lambda I\right)^{-1}\begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix}^\top\begin{bmatrix} y \\ 0 \end{bmatrix}$
$=\lim_{\lambda\rightarrow0} \begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix}^\top\left(\begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix} \begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix}^\top + \lambda I\right)^{-1}\begin{bmatrix} y \\ 0 \end{bmatrix}$
$= \begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix}^\top \left( \begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix} \begin{bmatrix} X \\ \sqrt{A}Z \end{bmatrix}^\top\right)^{-1} \begin{bmatrix} y \\ 0 \end{bmatrix} $
$= \begin{bmatrix} X \\ Z \end{bmatrix}^\top \begin{bmatrix} I & \\ &\sqrt{A} \end{bmatrix}^\top \left(\begin{bmatrix} I & \\ &\sqrt{A} \end{bmatrix}\begin{bmatrix} X \\ Z \end{bmatrix} \begin{bmatrix} X \\ Z \end{bmatrix}^\top \begin{bmatrix} I & \\ &\sqrt{A} \end{bmatrix}^\top \right)^{-1}\begin{bmatrix} y\\ 0 \end{bmatrix} $
$=\begin{bmatrix}X\\Z\end{bmatrix}^\top \left(\begin{bmatrix}X\\Z\end{bmatrix}\begin{bmatrix}X\\Z\end{bmatrix}^\top\right)^{-1}\begin{bmatrix}I&\\&\sqrt{A}^{-1}\end{bmatrix}^\top \begin{bmatrix}y\\0\end{bmatrix}$
$=\begin{bmatrix}X\\Z\end{bmatrix}^\top \left(\begin{bmatrix}X\\Z\end{bmatrix}\begin{bmatrix}X\\Z\end{bmatrix}^\top\right)^{-1} \begin{bmatrix}y\\0\end{bmatrix}$
This is true whenever $Y=\pmatrix{X\\ Z}$ has full row rank and $A$ is nonsingular (there is no need to assume that $A$ is positive definite or symmetric). Essentially, it's because $V=\operatorname{range}(Y^\top)$ is an invariant subspace on which $M=X^\top X+Z^\top AZ$ is nonsingular and $\ker(M)=\ker(Y)=V^\perp$. Since $X^\top y$ also lies in $V$, everything effectively occurs in $V$. In other words, it suffices to assume that $Y$ is a square nonsingular matrix. In this case, $$ M^{-1}X^\top y =Y^{-1}(I_n\oplus A^{-1})(Y^\top)^{-1}X^\top y =Y^{-1}(I_n\oplus A^{-1})(I_n\oplus0)y =Y^{-1}(I_n\oplus0)y $$ is clearly independent of $A$.
If you are not comfortable with restriction on $V$, you may perform singular value decomposition on $Y$ to re-express it in the forms of $$ Y =\pmatrix{Y_0&0_{(n+m)\times(d-n-m)}}U^\top =\pmatrix{X_0&0_{n\times(d-n-m)}\\ Z_0&0_{m\times(d-n-m)}}U^\top $$ where $X_0\in\mathbb R^{n\times(n+m)},\,Z_0\in\mathbb R^{m\times(n+m)},\,Y_0=\pmatrix{X_0\\ Z_0}\in GL(n+m)$ and $U\in O(d)$. It follows that \begin{aligned} M^\dagger X^\top y &=\left[U\pmatrix{Y_0^\top\\ 0}(I_n\oplus A)\pmatrix{Y_0&0}U^\top\right]^\dagger U\pmatrix{X_0^\top\\ 0}y\\ &=U\left[\pmatrix{Y_0^\top\\ 0}(I_n\oplus A)\pmatrix{Y_0&0}\right]^\dagger \pmatrix{X_0^\top y\\ 0}\\ &=U\pmatrix{Y_0^\top(I_n\oplus A)Y_0&0\\0&0}^\dagger \pmatrix{X_0^\top y\\ 0}\\ &=U\pmatrix{[Y_0^\top(I_n\oplus A)Y_0]^\dagger&0\\0&0}\pmatrix{X_0^\top y\\ 0}\\ &=U\pmatrix{[Y_0^\top(I_n\oplus A)Y_0]^\dagger X_0^\top y&0\\0&0}\\ \end{aligned} and the problem reduces to the case where $Y$ is square and nonsingular.