You originally asked how the provision holds up against the First Amendment. I showed how it is government contractors being restricted. Government contractors act on behalf of the government. I then showed how the First Amendment does not necessarily protect those who act on behalf of the government, because this is the government placing a limit "on its own speech".
I did not find anything about contractors in the link you provided and the excerpt did not apply.
Even if that were present, why should "Congress said so" have any meaning?
I am aware the judiciary has occasionally upheld the legality of such laws--just as they have upheld Civil Asset Forfeiture, Qualified Immunity, given us Citizens United, ended the Voting Rights Act, and sundry other decisions that will surely be judged well by future history.