This is D&D. Anything can do anything, if the DM says so.
If, however, you want a playable game with consistency, we'll see what we can do.
A wish has a list of effects. Anything wished for elsewise is encouraged to be twisted into something that the wisher does not want, the more powerful the wish the more twisted.
If an effect this strong was easy to get, well, players get wishes all the time. We shouldn't give the BBEG the same ability and make the BBEG's version better for no good reason.
So let us come up with a reason why the BBEG can do this, and make it one that can involve the PCs getting involved.
In order for a BBEG to make a wish that cannot be twisted even though it destroys reality, the wish must be perfect. So perfect that it cannot be twisted.
It has to be perfect words said with perfect intent.
Finding the perfect words and creating a being to state them with perfect intent is going to be much harder than simply casting wish. If the BBEG simply states a naive paradox, something that the BBEG didn't intend will happen and probably defeat the BBEG.
So the BBEG needs a perfect oracle, and a perfect creature to make the wish. If the BBEG has both, they can end reality.
For an example of a source of a perfect oracle, suppose the God of Truth owed a favour to a mortal, and promised them a Truth. This Truth was never "cashed in". The God of Truth cannot lie, and has perfect oracular abilities. So the BBEG seeks to get the right to ask the question of the God of Truth.
Maybe a particular bloodline has the right to ask the question, or the holder of a particular object, or someone with a particular position (like the Queen of a particular land). Or all 3; bloodline, crown and throne. So the BBEG's initial plot is setting up a Queen of Ancient Royal Blood in a revived ancient empire, crowning her, and then compelling her to ask a specific question of the God of Truth.
At this point, the BBEG could seem to be a good guy (with some foreshadowing), where they overthrow some despotic kingdom to place the Rightful Returned Queen on the Throne (in exchange for a simple favour; asking that one question, bound by magic to occur).
Once the question is asked, the BBEG now knows the words and what kind of creature has to say it. And the PCs become aware of the BBEG's plan, because they are there when the BBEG asks the question (or they get to talk to a witness).
Naturally the wish is in the ancient language of the Gods -- the language of Creation itself -- as no other language can express the paradox in a way that cannot be warped, and only a God can speak that langauge properly.
The BBEG now tries to acquire a God to ask the question, while the PCs race to stop the BBEG.