If $a\ne0$:
$P\left(x,\frac{x^2-f(x)}2\right)\Rightarrow f(x)(f(x)-x^2)=0$
Denote $f(x)=\begin{cases}x^2&\text{if }x\in A\\0&\text{if }x\in B\end{cases}$, where $A\cup B=\mathbb R$ and $A\cap B=\emptyset$, $0\in B$. Now assume that $|A|\ge1$ (the opposite would be $\boxed{f(x)=x^2,a=4}$ works) and $|B|\ge2$.
Assume $\exists i,j\ne0:f(i)=0,f(j)=j^2$.
$P(i,j)\Rightarrow f(i^2-j)=j^2\in\{0,(i^2-j)^2\}$, and since $j\ne0$ we would need $j^2=(i^2-j)^2$, so $i^2(i^2-2j)=0$ and hence $i^2=2j$. Thus $|B|\le1$. If $|B|=0$, then $\boxed{f(x)=0,a\in\mathbb R}$ works. Now assume that $|B|=1$. Then $|A|$ is at most $2$, contradiction. No more solutions here.
Assume now that $a=0$.
If $f$ is injective then $P(0,x)$ gives a contradiction upon varying $x$. So $\exists a\ne b:f(a)=f(b)$. Assume $a\ne-b$. Then $P(a,x),P(b,x)$ gives that $f(x)=f(x+\Delta)$ for some $\Delta\ne0$. Now $P(x,x^2),P(x+\Delta,x^2)$ gives $f(2\Delta x)=f(0)$, so $f$ is constant, and $\boxed{f(x)=c\in\mathbb R,a=0}$ works. Then we must have $a=-b$ if we assume otherwise. Then $f(x)+y=y-x^2$, so $\boxed{f(x)=-x^2,a=0}$ works.