On the Role of Continuum-driven Eruptions in the Evolution of Very Massive Stars and Population III Stars