But would any potential cause of action be based on breach of contract (which I understand) or violation of some free speech right?
In the US, free speech is a right against government interference. Just because the government cannot imprison or otherwise penalize you for exercising your rights of free speech and/or expression, it does not mean you cannot be fired or punished by your employer, for example. To use another example, if I sign a membership agreement, and the owner of the club kicks me out because I expressed my dissatisfaction with the course conditions, I cannot sue the club for violation of my right to free speech. If anything, I may be able to sue based on some breach of contract theory, but even that ultimately depends on the contractual language. If the agreement contains a non-disparagement clause, in out of luck. But, as you state, the law may well be different in the UK.