Let $R \in \mathbb{R}^{n \times n}$ be positive definite and $\phi \in \mathbb{R}^{p \times n}$. Assume that $p < n$ and that $\phi$ is rank $p$. Is there a unique $\bar{R} \in \mathbb{R}^{n \times n}$ such that all of the following?
- $\bar{R}$ is positive semidefinite
- $\bar{R}$ is rank $p$
- $\bar{R} \phi^{\rm T} = R \phi^{\rm T}$
I know one solution is $\bar{R} = R \phi^{\rm T} (\phi R \phi^{\rm T})^{-1} \phi R$ but I'm not sure if this is a unique solution.
Yes, the solution is unique. For convenience, I will write the equation as $AC=RC$ instead of $\bar{R}\phi^T=R\phi^T$. Since $R$ is positive definite (hence nonsingular), we may write $A=RXR$ for some positive semidefinite matrix $S$. So, from $AC=RC$, we obtain $RXRC=RC,\,XRC=C$ and in turn $XRP=P$, where $P=CC^+$ is the orthogonal projection onto the column space of $C$.
Let $S=PRP$. Since $XRP=P$, the column space of $P$ lies inside the column space of $X$. However, as $P$ and $X$ have the same rank, their column spaces must be equal to each other. Hence $XP=PX=X$ and from $XRP=P$ we obtain \begin{align} XS&=XPRP=XRP=P,\\ SX&=(XS)^T=P^T=P,\\ XSX&=PX=X,\\ SXS&=SP=PRP^2=PRP=S.\\ \end{align} Hence all four defining properties of Moore-Penrose pseudo inverse (namely, $XSX=X,\,SXS=S$, $XS$ is Hermitian and $SX$ is Hermitian) are satisfied, $X$ is necessarily equal to $S^+$ and $A$ is necessarily equal to $RXR=RS^+R=R(PRP)^+R$.
Remark. As you have found that $A=RC(C^TRC)^{-1}C^TR$ is a solution, the uniqueness of $A$ implies that $(PRP)^+$ must be equal to $C(C^TRC)^{-1}C^T$. This can be easily proved by performing a singular value decomposition of $C$ and I will omit the proof here.