Lugia is a special attacker, not a physical attacker. However the main reason to use it is because it's a great wall, so while you want good IVs all around, defensive IVs are what matter most. And no EVs don't. Just use a physical Rayquaza, it's better anyway.
I don't play ubers so I'm not sure if I can give you good advice. Competitively, Lugia wants to max out his defences for sure. The base power and type of Hidden Power is determined by the EVs, yeah. But in the first place Rayquaza doesn't need to run Hidden Power at all o.o