Victoria residents studying to become secondary school teachers have their degrees paid by the state government to fill staff shortages in the sector.