Ok, let's look at the source code:
"Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances."
And pseudo-code the relevant snippet:
"Government agents shall not create rules which criminalize speech //throws an exception in specific cases, see SupremeCourt.cpp"
So the points of issue are really whether A: this is a rule and B: it criminalizes his speech.
Point A, is a contract a rule? It's easy to say that this is irrelevant because he agreed to it, but I don't think that totally resolves the question (not all agreements are legally recognized, even when both parties consent with full knowledge). I wouldn't blame you for saying no, but I find myself spinning around in circles pondering it.
Point B, does it criminalize his speech? I believe that the charges were criminal and not civil, so lets say that had he not agree that would have meant criminal charges. One could argue, and I'm not claiming to back this, that in effect the SEC was extorting a restriction of his free speech under thread of criminal law, which indirectly means that the SEC was "criminalizing" the speech being restricted. One could equally argue for the other side that Elon was handed a get out of jail free card. If the SEC couldn't offer such consent decrees as an option that it would increase the likihood of people being prosecuted as criminals; thus, how can it possibly be seen as a criminalization if it offers options to REDUCE criminal liability?
Somewhere down in the bowels of this nonsense are some interesting legal questions to chew on.