Multiphoton quantum interference is the underlying principle for optical quantum information processing protocols. Indistinguishability is the key to quantum interference. Therefore, the success of many protocols in optical quantum information processing relies on the availability of photon states with a well-defined spatial and temporal mode. Photons in single spatial mode can be obtained from nonlinear processes in single-mode waveguides. For the temporal mode, the common approach is to engineer the nonlinear processes so as to achieve the required spectral properties for the generated photons. But, this approach is complicated because the spectral properties and the nonlinear interaction are often intertwined through phase-matching condition. In this paper, we study a different approach that separates the spectral control from nonlinear interaction, leading to versatile and precise engineering of the spectral properties of nonlinear parametric processes. The approach is based on an SU(1,1) nonlinear interferometer with a pulsed pump and a controllable linear spectral phase shift for precise engineering. We systematically analyze the important figures of merit such as modal purity and heralding efficiency in characterizing a photon state and use this analysis to investigate the feasibility of this interferometric approach. Specifically, we analyze in detail the requirement on the spectral phase engineering to optimize the figures of merit and apply numerical simulations to the nonlinear four-wave mixing process in dispersion-shifted fibers with a standard single-mode fiber as the phase control medium. Both modal purity and efficiency are improved simultaneously with this technique. Furthermore, a multistage nonlinear interferometer is proposed and shown to achieve more precise state engineering for near-ideal single-mode operation and near-unity efficiency. We also extend the study to the case of high pump power when the high gain is achieved in the four-wave mixing process for the spectral engineering of quantum entanglement in continuous variables. Our investigation provides an approach for precisely tailoring the spectral property of quantum light sources, especially, photon pairs can be engineered to simultaneously possess the features of high purity, high collection efficiency, high brightness, and high flexibility in wavelength and bandwidth selection.