The max HP for Rotom is 304 but this one had 404. What's happening ?
Either one of these happened.
That was probably a Mew that Transformed into it. The only Pokemon that can Transform and has 404 HP is Mew.
The Rotom-W you saw was hacked, as Rotom-W can only have 304 max HP.