The Resolution Foundation warned that funding for the NHS was increasingly coming at the expense of other public services