It seems that the specialization constant indices and values provided to glSpecilaizeShader do not factor into the hash generation. So only the first specialization is reloaded from the cache even with different specialization constants provided on subsequent calls to glSpecializeShader (also on different program instances, only the first ever passed constants are in use).
A test program with two shader programs created from a single spir-v source with different specialization constants illustrates this, with shader cache enabled both shader programs behave identically, with the cache disabled, the expected result is rendered. (A test on an AMD system also renders correctly)
Tested on Linux and Windows with the current 430.40 driver.