RAWALPINDI, Pakistan—On the campaign trail just over a year ago, former cricket star Imran Khan won the prime ministership promising to create 10 million jobs, provide low-cost housing and better health and education services—a cornucopia for his base of support among Pakistan’s rising middle class.

Now Mr. Khan finds himself testing that support as an economic austerity plan forces him to tax that middle class more while the economy is slowing sharply.

“The...