Let $\mathcal{M} $ be a hyper-plane in $\mathbb{R}^{n \times n}$ constrained in the positive semidefinite (P.S.D.) cone, for example, $ \mathcal{M} $ could be:
$$ \mathcal{M} = \left\{ Q\succeq 0 \:\big\vert\: 1^TQ1 =0 \right\}, \text{where 1 is the vector of all 1's.} $$
For a symmetric P.S.D. matrix $A \in \mathbb{R}^{n\times n}$, I'm wondering whether there exists a closed form solution (under any kind of inner product) of the orthogonal projection of $ A $ onto $ \mathcal{M} $, i.e., the closed form of
$$ {P}_{ \mathcal{M} } \left( A \right) = \arg \min_{Q \in \mathcal{M}} \|A - Q\|_2 $$
In the special case where $x=(1,0,\ldots,0)^T$, your constraint equation $M=\{Q: x^TQx=c\}$ reduces to requiring only that the upper left entry of $Q$ be equal to $c$. Then it is easy to see that $P_M$ is given by the recipe: set all matrix entries equal to $0$, except for the $(1,1)$ entry which is unchanged, at least for the Frobenius norm.
The case of a general $x$ vector reduces to this by an orthogonal change of variable.
For example, if $e_1=(1,0,\ldots,0)^T$ one can find an orthogonal matrix $U$ such that $U x =\|x\| e_1$. Then the constraint $x^T Q x=c$ turns into $e_1^T U^T Q U e_1 = \|x\|^2c$, that is, $e_1 \hat Q e_1 = c'$, where $\hat Q = U^T Q U$ and $c'=\|x\|^2c$. Then your $P_M$ is the composition of the simple projection described above and the maps $A\mapsto U A U^T$ and $A\mapsto U^T A U$. Maybe you should fill in the details of exactly which order these compositions should applied and how the matrix $U$ might be found.