Given a nonzero integer n, Gupta and Saha [‘Integer solutions of the generalised polynomial Pell equations and their finiteness: the quadratic case’, Canad. Math. Bull., to appear] classified all polynomials $x^2+ax+b\in {\mathbb {Z}}[x]$
for which the polynomial Pell equation $P^2-(x^2+ax+b)Q^2=n$
has solutions ${P,Q\in {\mathbb {Z}}[x]}$
with $Q\neq 0$
. We generalise their work to the equation $P^2-(f^2+af+b)Q^2=nR$
, where f is a fixed polynomial in ${\mathbb {Z}}[x]$
. As an application of our results, we study the equation $P^2-D(f)Q^2=n$
, where D is a monic, quartic and non square-free polynomial in ${\mathbb {Z}}[x]$
. This extends Theorem 1.4 of Scherr and Thompson [‘Quartic integral polynomial Pell equations’, J. Number Theory 259 (2024), 38–56].