Government warned over impact on schools after political chaos led to the collapse of the Truss government after two months