We present a family of exact analytic solutions for nonlinear quantum dynamics of a two-level system (TLS) subject to a periodic-in-time external field. In constructing the exactly solvable models, we use a "reverse engineering" approach where the form of external perturbation is chosen to preserve an integrability constraint, which yields a single nonlinear differential equation for the ac field. A solution to this equation is expressed in terms of Jacobi elliptic functions with three independent parameters that allows one to choose the frequency, average value, and amplitude of the time-dependent field at will. This form of the ac drive is especially relevant to the problem of dynamics of TLS charge defects that cause dielectric losses in superconducting qubits. We apply our exact results to analyze nonlinear dielectric response of such TLSs and show that the position of the resonance peak in the spectrum of the relevant correlation function is determined by the quantum-mechanical phase accumulated by the TLS wave function over a time evolution cycle. It is shown that in the nonlinear regime, this resonance frequency may be shifted strongly from the value predicted by the canonical TLS model. We also analyze the "spin" survival probability in the regime of strong external drive and recover a coherent destruction of tunneling phenomenon within our family of exact solutions, which manifests itself as a strong suppression of "spin-flip" processes and suggests that such nonlinear dynamics in LC resonators may lead to lower losses.