The chancellor has refused to rule out inheritance and capital gains tax rises after Sir Keir Starmer warned the autumn budget will be "painful".