$\newcommand{\ga}{\gamma}
\newcommand{\be}{\beta}
\newcommand{\al}{\alpha}
$
Without loss of generality, $a=1$.
You already know how to deal with the case when $P(x)$ has a non-real root, and this case was also proved by Stanley Yao Xiao.
Consider now the situation when all the four roots of $P(x)$ are real. The trivial solution corresponds to the case when the transformation
$$t\mapsto x=g(t):=\frac {\al t+\be}{\ga t+1}$$ is constant (that is, when $\al=\ga=0$); apparently, you don't need this trivial solution, and so, it will be excluded from the further consideration.
By shifting, without loss of generality (wlog) the roots of $P(x)$ are $a,-a,b,c$ for some real $a,b,c$, so that
\begin{equation*}
P(x)=(x^2-a^2)(x-b)(x-c); \tag{0}
\end{equation*}
details on this have been added at the end of this answer.
Under the transformation $x\leftrightarrow g(t)$, the multiset $\{a,-a,b,c\}$ of the roots of $P(x)$ must be in a one-to-one correspondence with the multiset $\{u,-u,v,-v\}$ of the roots $t$ of the polynomial $Q(t):=(M_1+N_1t^2)(M_2+N_2t^2)$ -- this is a necessary and sufficient condition for your desired representation. Indeed, if we have such a match, that is, such a one-to-one correspondence of the multisets of the roots, then
\begin{equation*}
P(x)=R(t):=\frac{(M_1+N_1t^2)(M_2+N_2t^2)}{(\gamma t+1)^4} \tag{1}
\end{equation*}
for $x=g(t)$, where
\begin{equation*}
N_1=P(\al),\quad N_2=1,\quad M_1=-u^2 N_1,\quad M_2=-v^2 N_2. \tag{2}
\end{equation*}
Let us now get to the matching business between the multisets $\{a,-a,b,c\}$ and $\{u,-u,v,-v\}$, so that
\begin{equation*}
\{g(u),g(-u),g(v),g(-v)\}=\{a,-a,b,c\}. \tag{3}
\end{equation*}
Note that one always has at least one of the following two cases:
Case 1: $D_1:=(a^2 - b^2) (a^2 - c^2)\ge0$ or
Case 2: $D_2:=a (a + b) (a - c) (b - c)>0$.
Consider first Case 1. Then we have (3) (in fact, more specifically, here we have $(g(u),g(-u),g(v),g(-v))=(a,-a,b,c)$) with
\begin{align*}
\al&=\frac{\sqrt{D_1}+a^2+bc}{b+c}, \\
\be&=\frac{-\sqrt{D_1}+a^2+bc}{b+c}, \\
\ga&=1,\\
u&=\frac{-\sqrt{D_1}+a^2+b c}{a(b+c)}, \\
v&=-\frac{2\sqrt{D_1}-2 a^2+b^2+c^2}{(b-c) (b+c)},
\end{align*}
and hence, with $M_1,N_1,M_2,N_2$ as in (2), we have (1) -- except when one of the denominators in the latter display equals $0$.
Consider now those exceptional subcases of Case 1:
Subcase 1.0: $b+c=0$. Then $P(x)=(x^2-a^2)(x^2-b^2)$, so that (1) holds with $x=t$, that is, with $\al=\ga=0$ and $\be=1$.
Subcase 1.1: $b=c$.
Subsubcase 1.1.0: $b=c\ne0\ \&\ a\ne0$. Then $\al=a^2/b, \be=b, \ga=1,u=b/a, v =0$ will do.
Subsubcase 1.1.1: $b=c=0\ \&\ a\ne0$. Then $\al=a, \be=0, \ga=0,u=1, v =0$ will do.
Subsubcase 1.1.2: $b=c\ne0\ \&\ a=0$. Then $P(x)=x^2(x-b)^2$, and here -- an exception among the exceptions! -- (1) cannot hold for any $M_1,N_1,M_2,N_2$.
Subsubcase 1.1.3: $b=c=0\ \&\ a=0$. This is covered by Subcase 1.0.
Subcase 1.2: $b\ne c$. Then $\al=\frac{2 b c}{c-b}, \be=0, \ga=\frac{b+c}{c-b},u=0, v =1$ will do.
In Case 2, we have (3) (in fact, more specifically, here we have $(g(u),g(v),g(-u),g(-v))=(a,-a,b,c)$) with
\begin{align*}
\al&=\frac{a (b+c)+\sqrt{2} \sqrt{D_2}}{2 a+b-c}, \\
\be&=\frac{a (b+c)-\sqrt{2} \sqrt{D_2}}{2 a+b-c}, \\
\ga&=1,\\
u&=-\frac{2 a^2+a (b-3 c)+2 \sqrt{2}
\sqrt{D_2}+b^2-b c}
{(a-b) (2a+b-c)} \\
v&=\frac{2 a^2+a (b-3 c)+2 \sqrt{2}
\sqrt{D_2}+b^2-b c}{(a-b)^2 (a+c) (2 a+b-c)} \\
&\times\left(-a^2+2
\sqrt{2}
\sqrt{D_2}-3 a b+3 a c+b c\right),
\end{align*}
and hence, with $M_1,N_1,M_2,N_2$ as in (2), we have (1) -- -- except when one of the denominators in the latter display equals $0$.
Consider now those exceptional subcases of Case 2:
Subcase 2.1: $c=2a+b$.
Subsubcase 2.1.0: $c=2a+b\ \&\ b\ne-3a$. Then $\al=\frac{1}{2} (3 a+b)$, $\be=\frac{a+b}{2}$, $\ga=0$, $u=\frac{a-b}{3 a+b}$, $v=-1$ will do.
Subsubcase 2.1.1: $c=2a+b\ \&\ b=-3a$. Then $\al=2a$, $\be=-a$, $\ga=0$, $u=1$, $v=0$ will do.
Subcase 2.2: $b=a\ \&\ c\ne2a+b$.
Subsubcase 2.2.0: $b=a\ \&\ c\ne2a+b=3a\ \&\ c\ne-a$. Then $\al=\frac{3 a c-a^2}{3 a-c}$, $\be=a$, $\ga=1$, $u=0$, $v=\frac{c-3 a}{a+c}$ will do.
Subsubcase 2.2.1: $b=a\ \&\ c\ne2a+b=3a\ \&\ c=-a$. This is covered by Subcase 1.0.
Subcase 2.3: $c=-a\ \&\ b\ne a\ \&\ c\ne2a+b$, so that $b\ne-3a$.
Then $\al=\frac{a (a+3 b)}{3 a+b}$, $\be=-a$, $\ga=1$, $u=\frac{3 a+b}{b-a}$, $v=0$ will do.
Thus, your desired representation is always possible (and in fact is given here explicitly), except when $P(x)$ has two distinct real roots, each of multiplicity $2$ -- as in Subsubcase 1.1.2.
Added details on (0): It has just been shown that for any real $a,b,c$ there exist real $\al,\be,\ga,M_1,N_1,M_2,N_2$ such that for all real $t$ (with $\ga t+1\ne0$) we have
\begin{equation*}
Q(w):=(w^2-a^2)(w-b)(w-c)=\frac{(M_1+N_1t^2)(M_2+N_2t^2)}{(\ga t+1)^4}
\end{equation*}
with
\begin{equation*}
w=\frac {\al t+\be}{\ga t+1}.
\end{equation*}
Now we can write
\begin{equation*}
P(x)=(x-x_1)(x-x_2)(x-x_3)(x-x_4)=(w^2-a^2)(w-b)(w-c)
=\frac{(M_1+N_1t^2)(M_2+N_2t^2)}{(\ga t+1)^4}
\end{equation*}
for real $x_1,x_2,x_3,x_4$, where $w:=x-d$, $d:=\frac12\,(x_1+x_2)$, $a^2:=d^2=x_1x_2\ge0$, $b:=x_3-d$, $c:=x_4-d$.
At the same time, we have
\begin{equation*}
x=w+d=\frac {\al_1 t+\be_1}{\ga t+1}
\end{equation*}
with $\al_1:=\al+\ga d$ and $\be_1:=\be+d$.
So, for any real $x_1,x_2,x_3,x_4$ there exist real $\al_1,\be_1,\ga,M_1,N_1,M_2,N_2$ such that for all real $t$ (with $\ga t+1\ne0$) we have
\begin{equation*}
(x-x_1)(x-x_2)(x-x_3)(x-x_4)
=\frac{(M_1+N_1t^2)(M_2+N_2t^2)}{(\ga t+1)^4}
\end{equation*}
with
\begin{equation*}
x=\frac {\al_1 t+\be_1}{\ga t+1},
\end{equation*}
as desired.