The Scottish government’s flagship policies are poised to be put at risk due to a funding erosion for Holyrood