Secretary of State George P. Shultz, winding up a futile Middle East peace mission, said Tuesday that extremism and an arms buildup could engulf the region unless Arabs and Israelis shed their illusions. He said the United States would not slow its efforts to prod the two sides into negotiations, adding that he would like to have another try at Mideast diplomacy before the Reagan administration leaves office in January. "The underlying problem won't go away by itself and can't be wished away," Shultz told a news conference in Washington. "Nor can it be ignored. The lives and well-being of too many people are endangered by the continuation of this conflict."