A teaching union leader has called on politicians to sacrifice “pet projects” and prioritise giving schools the funding and flexibility needed to meet children’s needs.