It really depends how badly hacked it is. If it is just hacking to gain normal evs instead of actually ev training it should let it through (it still may let it through even if you do max out all its evs). I personally don't hack, but I have traded for some hacked Pokemon and this is some of the results:
Salamence: 31 ivs in all stats, 252 evs in all stats, shiny and caught in a masterball: let through
Arceus: 31 ivs in all stats, 252 evs in all stats, not shiny and caught in a pokeball: let through
Arceus: French, 31 ivs in 2 stats, 252 evs in 2 stats, shiny and caught in a dusk ball: Not let through
Smeargle: 31 ivs in 4 stats, 252 evs in all stats, shiny, caught in a safari ball and with the move struggle (why?) Let through
The oddest thing is this one I breeded,
Greninja: 31 ivs in all stats, 252 evs in sp. att. and spd, caught in a dusk ball, shiny: Not let through
It really is just how extreme the game thinks the Pokemon is!