  In the paper, we study an inverse spectral problem for quadratic pencils of
the Sturm--Liouville operators with singular coefficients and entire functions
in the boundary conditions. We prove that a subspectrum is sufficient for
recovering the pencil if this subspectrum generates a complete functional
system. As well, we obtain an algorithm solving the inverse problem and
alternative conditions on the subspectrum. Finally, these results are applied
to studying a partial inverse problem.
