Pentagon chief pressed on war spending, military stockpiles, and unclear endgame