Modelling structure, phase transition, and vibrational spectroscopy of silica at extreme conditions