Edit: this only answers the old version of the problem. The question was changed so this answer is out of date.

The original problem was $$p^{x-z}(p^x-1)=\frac{n^2-1}{p^z}-3$$

Suppose we have a solution to the equation. The only hypotheses we need are that $p$ be any integer $\ge 2$, and $x>z>0$.

Then $$n^2=1+3p^z+p^x(p^x-1)$$ $$n^2=(p^x+1)^2-3(p^x-p^z)<(p^x+1)^2$$ $$n^2=(p^x-1)^2+p^x+3p^z>(p^x-1)^2$$ So we must have $$n^2=(p^x)^2$$ but this would imply $n^2=0 \pmod p$, which contradicts $n^2=1 \pmod p$ from the first equation above. So there cannot be any solution.