Let $B \in \mathbb{R}^{d \times n}$ with $d \geq n$ and $B^\top B$ is not singular. How many solutions does the equation $$ X^\top X = B^\top B $$ have?
If we do SVDs then $X = U_X D_X V_X^\top$ and $B = U_B D_B V_B^\top$ and we'll see, that
\begin{split} (U_X D_X V_X^\top)^\top (U_X D_X V_X^\top) &= (U_B D_B V_B^\top)^\top (U_B D_B V_B^\top) \\ V_X D_X^2 V_X^\top &= V_B D_B^2 V_B^\top \\ V_B^\top V_X D_X^2 V_X V_B^\top &= D_B^2 \\ (V_B^\top V_X) D_X^2 (V_B^\top V_X)^\top &= D_B^2 \\ V_B^\top V_X D_X^2 &= D_B^2 V_B^\top V_X \end{split}
(last equation follows from the fact, that unitary matrices is a group, so $(V_B^\top V_X) \cdot (V_B^\top V_X)^\top = I$).
And now I do not know, where to go from this point.
There is an infinity of solutions in $X\in M_{d,n}(\mathbb{R})$ except when $n=d=1$.
Let $Z=\{X\in M_{d,n};X^TX=B^TB\}$.
$\textbf{Proposition.}$ $Z$ is an algebraic set of dimension $n(2d-n-1)/2$.
$\textbf{Proof}.$ Clearly $rank(B)=rank(X)=n$ and $B\in Z$.
$H\in M_{d,n}$ is in $T_XZ$, the tangent vector space of $Z$ in $X$ iff $H^TX+X^TH=0$, that is $X^TH=K\in SK_n$ where $SK_n$ is the space of $n\times n$ skew symmetric matrices.
Thus $H={X^T}^+K+(I_d-X(X^TX)^{-1}X^T)W$ where $W\in M_{d,n}(\mathbb{R})$ is an arbitrary matrix.
Note that $dim(Z)$ is the dimension of the space generated by $H={X^T}^+K+g(W)$ when $K,W$ vary, where $g= (I_d-X(X^TX)^{-1}X^T)\otimes I_n$. cf.
https://en.wikipedia.org/wiki/Kronecker_product
Since ${X^T}^+$ is injective, ${X^T}^+K$ generates a space of dimension $n(n-1)/2$.
On the other hand, $rank(g)=rank(I_d-X(X^TX)^{-1}X^T)rank(I_n)=(d-n)n$.
$dim(Z)$ is the sum of the two above one because the images of the functions $K\mapsto {X^T}^+K$ and $g$ have intersection $\{0\}$.
We can see that in the particular case when $n=2,d=3,X=\begin{pmatrix}1&0\\0&1\\0&0\end{pmatrix},K=\begin{pmatrix}0&b\\-b&0\end{pmatrix},W=\begin{pmatrix}p&q\\r&s\\t&u\end{pmatrix}$ (I do not have the courage to write the general case). We obtain that $H=\begin{pmatrix}0&b\\-b&0\\t&u\end{pmatrix}$ depends on $3$ parameters.