The newly hatched Pokemon does not recieve the "hack". The game will treat the egg as normal, with the same chances to receive the IV base stat as the parent that the egg will have handed down. Things that influence the IV carry down is the hold items, such as Power Brace. Nature can be handed down as well with the Everstone.
Most hacked Pokemon return to "normal" once they are placed in the PC. The PC re-sets a Pokemon unless the Pokemon is RNG'd. The original coding to the Pokemon is restored in the PC, if this does not happen- get rid of it ASAP, release it. EV'd Pokemon stay the same, as the EV coding is added into the coding of the Pokemon. Anything that goes beyond that and is not normal coding, the hack is bad news all around, thus get rid of that Pokemon through release methods. (party/PC)
You will not need to trade the hatched egg over to another game. The only thing that is infectious in a game is the Pokerus. Even that has a time limit to pass it along.
Breeding will happen the same as the way the game is programed, using a flawless Pokemon in the breeding is the same as using an RNG'd Pokemon. If it is possible in the game to get a flawless Pokemon, then it is programed into the game to allow breeding rules/influences to occure the same as the breeding is code written to hatch a Pokemon that is independent to what the Parents have as to the IV's and nature, along with egg moves.
Back in the day, the "bad egg" is a corrupt file, meaning that the coding was not legit and thus that was the result of bad hacking. You could "release" the invisible "bad egg", and it would go away. Anything other then just letting those "bad eggs" whether visible/invisible would cause the game to become corrupt, and then yes, your only option would be to restart a new file if the "bad egg" was used for anything.
The breeding rules have changed a good amount since then, things like the power items and the everstone are great tools to use to breed the Pokemon your wanting to have. If RNG is not your cup of tea, then breeding is the best option for using the hold items to influence your breeding. Having a Flawless RNG'd Pokemon in the day care only increases the passing on of the IV stat, the game will see the flawless RNG'd Pokemon as "possible/can happen" ( I say "possible" in that the odds of randomly encountering a flawless IV Pokemon without RNG'ing is way crazy odds.)-
Pokemon and just simply apply the breeding rules accordingly.
The best way to prevent having hacked Pokemon to not have the chance to mess up your game is to:
1. Know the source of whom your getting a Pokemon from.
2. If a Pokemon is "too good to be true"- meaning that it is over the limit on it's EV's in a stat, caught in an area that is not legit, and many other factors- release it immediatly. A simple releasing it from the PC is the best way to rid the hacked Pokemon. Don't move it around, don't try to trade it off- release it. If it is in your party, do not move it to the PC box, release it. ASAP.
3. Do not continue to trade with a person who sends you a hacked Pokemon. No matter how bad your want the Giratina- be mindfull of what it is they are asking for in return. Consider each trade with asking your self "They want a Blazakin for a level 100 Giratina?"- I personaly would not go for the trade.
4. Check the lowest possible level of a Pokemon up for trade, depending on what the Pokemon is. Regigigas can be level one and all, but if it is shiny- odds are that it is hacked.
5. Battle ready Pokemon- be vary cautious of this. A person could 'quick build" a Pokemon and make a mistake. You want to be in a specific tournament- it is best to trade with a person who has legit credit for being a legit trade. Or breed/build the Pokemon yourself.
6. GTS- good to fill your Pokedex with, and trade for common Pokemon only. Unless a person really needs to hack for a Skitty- the chances of that is so little, a trade like that is no big deal.
7. The Pokemon that are the most hacked are the Pokemon in the OU and Uber lists. Again, know a trusted source to getting these Pokemon.
8. Make your trades worth the effort. A person will want a specific Pokemon, in return you should trade for a Pokemon that has about the same amount of effort placed into it as the one you want to recieve. Basically, a trade bargin among friends. Say you have 3 raised and battle worthy Garchomps. Offer one of those to a friend who has a "spare" battle worthy Pokemon they are willing to part with that you are wanting.
9. If a person is offering Event Pokemon- the chances of that person wanting a "grunt" Pokemon in return does not mean that the event Pokemon is hacked. Example: I myself have extra DL event Pokemon, thus I want to give them away as a prize or something similar. I will take a grunt Pokemon for the trade, since I rarely need anything in return.
Use comon sense for your trades.
At some events- they could check your entire cartridge for hacks. In general, you should want to keep your games as legit as possible. Sometimes you do get a hacked Pokemon through a trade- just keep the "When in doubt, toss it out" rule of thumb. There are a good number of ways to get the Pokemon your wanting, be sure to use legit sources to obtain what your looking for.
Here is what I do:
Rarly use GTS for that Pokemon that is just for Pokedex reasons. I release it anyways, and I do not look for the OU/Uber list stuff as it is.
Use the PokeRadar
Trade among trusted friends, or with people with a reputation to have legit Pokemon.
Dream World.
Trade over from your own games to the next/other. That way, you know the source.
A legit trader will be more "haggling"- meaning they put work into the Pokemon, thus not just wanting to give up a Pokemon so easily. That is what I do- I do not trade away a Pokemon that I spent a good amount of time into breeding/raising for just anything.
Trading is a part of Pokemon, and there is the pros/cons of doing so. Just keep in mind some trade tips, and you will decrease the chances of getting something hacked. If you get something hacked- or become away after that it is hacked- rid yourself of it and do not use it for anything.