We introduce a family of inhomogeneous XX spin chains whose squared couplings are a polynomial of degree at most four in the site index. We show how to obtain an asymptotic approximation for the Renyi entanglement entropy of all such chains in a constant magnetic field at half filling by exploiting their connection with the conformal field theory of a massless Dirac fermion in a suitably curved static background. We study the above approximation for three particular chains in the family, two of them related to well-known quasi-exactly solvable quantum models on the line and the third one to classical Krawtchouk polynomials, finding an excellent agreement with the exact value obtained numerically when the Renyi parameter $alpha$ is less than one. When $alphage1$ we find parity oscillations, as expected from the homogeneous case, and show that they are very accurately reproduced by a modification of the Fagotti-Calabrese formula. We have also analyzed the asymptotic behavior of the Renyi entanglement entropy in the non-standard situation of arbitrary filling and/or inhomogeneous magnetic field. Our numerical results show that in this case a block of spins at each end of the chain becomes disentangled from the rest. Moreover, the asymptotic approximation for the case of half filling and constant magnetic field, when suitably rescaled to the region of non-vanishing entropy, provides a rough approximation to the entanglement entropy also in this general case.