Dynamic optical spectroscopy and pyrometry of static targets under optical and x-ray laser heating at the European XFEL