Quantum-Field Effects In Ultrafast Nonlinear X-Ray And Optical Spectroscopy Of Molecules