Let's start with the obvious. Pokemon fangames are freeware in the sense that they are free to download and run(assuming that their creators are on the right side of the law, which they are if they're posted here on Pokecommunity). The tools you use to develop them may not be freeware(For example, RMXP).
However, I want to scream and shout and stamp my feet whenever anyone says that Essentials is the only engine capable of making a Pokemon game. Essentials is a kit in which the majority of the mundane legwork towards emulating a pokemon game has been done for you, but it is by no means the only way to make a Pokemon game. Unity, Game Maker, and Sphere(do people still use Sphere? I haven't heard of anyone doing so for a while) are all pre-built engines that you can use to make a Pokemon game.
And if you REALLY want to have total control of the game you're making? You could make the engine from scratch yourself using a programming language like C++.