There's no argument that ROM hacks are illegal in some jurisdictions. That's just fact in that it's written in the laws in those jurisdictions.
At the same time however, that doesn't really mean anything. An US State once passed a law that said the value of pi is equal to 3, and many States in the US considered entire human races legal property down to not very long ago, so those States trying to heroically pound on their chest while decrying the "evils of lesser men", which means poorer non-corporate men with no lawyers, doesn't really sway me. So, if anything, that something is codified in law mostly speaks that it is codified in customs, not much more.
Even more, sure, ROM hacks and fan games may be illegal, but they are not bad to do considering the alternative, in particular when it comes to GameFreak, and the legality only matters if the IP holder ever presses charges. As my Economics teacher said, people can do all the all the good and evil they want and it won't be a crime if no one presses charges which is why white collar corruption is so rampant yet a poor man that tries to feed a fellow stray dog can go to prison for 5 years and 1 day (and why it's so difficult to fix medical malpractice).
To complete the trifecta, as @jojobear13 pointed out, these IP laws are constructed on an unjust and unethical foundation of "copyright", which is so morally broken that our children and our grandchildren won't be able to participate in the culture that our fellow artists produce today, they'll only be able to consume if authorized to; yeah, it's only our grand-grandchildren that will be able to participate in the culture we create. How is that any ethically or morally right? And Nintendo is a particularly heinous case on that, to the point that the feelings of the homebrew scenes in general, even in mediums that have nothing to do with videogames, is that it is always ethical to pirate Nintendo stuff (see what happened, for example, with A Metroid 2 Remake).
tl;dr: to the question of "do I consider fan games illegal?" my answer is "they are the proof unjust laws must be fought against".