Gas prices are high, mortgage rates are climbing and inflation remains well above target, complicating the president’s midterm appeal.