Once again, no, it does not violate equal protection. Period. Equal protection: https://www.law.cornell.edu/wex/equal_protection
It merely violates your personal, subjective sense of good policy.
You seem determined to turn this into a legal argument. For the record, this isn't a matter of violating my "personal, subjective sense of good policy". Social Security alone does that. But subjectively allowing protections from it to some while denying it to others violates equal protection. If no one was allowed to opt out, then there would be no equal protection argument from me, even though I would still vehemently object to the overall policy of stealing retirement funds from workers (at the point of a gun) during their most productive years.
So lets consider these two workers - Raymond and Spike. Both are plant maintenance supervisors living in Richmond, VA. Raymond works at VCU while Spike works at UR. Both have access to investment opportunities that work towards a "legitimate governmental objective", i.e. financial security in retirement. However, Raymond has access to an additional asset - the Virginia Retirement Fund - that Spike does not have.
The federal government comes along and offers Raymond a deal. The government will stop confiscating 14% of his pay each check if he in turn puts money into the VRF. He agrees, and now he has a new non-Ponzi-scheme investment option to invest in. And he now has 14% of his personal pay that he can invest into it.
Meanwhile, Spike is left without any option. He would love to have the ability to take that 14% and invest it into a true investment fund. But he is prohibited by law from putting it into the VRF. And the federal government won't allow him to put it into a 401(k), IRA, or other type account.
Two workers. Same occupation. Same job description. But one is allowed the freedom to opt out of the Social Security ponzi scheme while the other does not. That violates equal protection without regard to any Constitutional definition. But if you want to argue the legal case, it comes down to what constitutes a "legitimate governmental objective". If that objective is financial security after retirement, then you bet your sweet ass this violates the Constitution. But if the government wants to argue that their legitimate governmental objective is to offer protections to government workers as a special class, then their open admission of equal protection violation would suffice to defend them from constitutional action. Catch-22.