I do not know which state or states run(s) the Mega Millions lottery, and am not familiar with their rules on preserving anonymity, but stories in the press over the last 5-10 years suggest that a winner CAN preserve his or her anonymity. I think the lottery folks would prefer that not happen, because they probably want the chance to take a photo with the lucky winner for promotional purposes.
that's been discussed on this board a few times over the years, and it always seems to confuse people.
Both Mega Millions and Powerball are multi-state operations. That said, if you are lucky enough to end up with a winning ticket, it's the rules of the state where you purchase the ticket that controls what happens. Some states allow winners to remain anonymous. Other states require winners to be identified. Some states have a bit of a hybrid, where winners can have their winnings go to a trust, which affords some degree of anonymity.
Most states that require disclosure adopted that when they started their lottery, where they felt that disclosing the identity of all winners would help give the public confidence that it was legit, and that insiders weren't somehow "winning" money. A few states in recent years have changed the rule to allow non disclosure. In many cases, they've done so after multiple horror stories of big winners being absolutely deluged with phone calls, letters, endless knocks on their door, etc. from people that have some problem, and think the big winners can help them with some of their winnings. I think New Jersey switched from a disclosure to an anonymity state in 2020.
Your post was in response to
@BW Lion's post. He was asking about using LLCs or other mechanisms to remain anonymous. Again, it's up to the state where the winning ticket was purchased. Some enable the winnings to be paid to a LLC (often good for tax purposes), but still require the individual/couple/group that won the ticket to be identified. Those states that allow winners to remain anonymous will either pay to an individual/couple/group or pay to a LLC.
There was a strange case a few years ago where a state allowed a winner to remain anonymous IF they requested that, or if they formed a LLC (I forget which). This individual wanted to remain anonymous, but they had looked at the state's lottery page and its instructions were that if you won a big ticket, that the first thing you should do was to sign the ticket. Unfortunately, they also had a rule (which they didn't indicate in those instructions) that if you signed the ticket with your name, you either couldn't remain anonymous, or couldn't form a LLC (again, I don't remember all the specifics). For some reason, I think it was in Massachusetts or in New Hampshire. Anyway, the winner took the state to court, and the judge found for the winner, as the judge felt the winner had followed the instructions to sign the ticket, but that the lottery had not indicated the other options, or the consequences of signing your name, so the winner got the money and was allowed to remain anonymous.
A lot of the state lotteries will, when contacted by winners, give them the name and number of a couple of companies whose business is dealing with big winners, and setting up tax plans for them, spending plans for them, handling investments, etc. Those companies know the rules for each state, and will advise the winners what their options are, and what are the best approaches for them from a tax perspective. I can't remember if they did it for a percentage of the winnings, or a set fee; you can google that if you are interested.