With the world awash in crude, the oil industry is contemplating a new problem the oversupply could tee up: an oil shortage.

As the oil glut has sent prices to decade lows, plummeting investment by oil-producing countries such as Venezuela and Russia and oil drillers such as Exxon Mobil Corp. and Royal Dutch Shell PLC means fewer barrels will be produced.

That...