The spectral variability of the gamma-ray emission from Geminga and VELA and its implications