Conventional wisdom says that terrestrial planets and hot Jupiters are not likely companions. These gas giants in close orbits aren't thought to form in situ, but rather to form further away from their stars and then migrate inwards. Two main mechanisms have been proposed:
- Type II gas disk migration, where a giant planet exchanges angular momentum with a protoplanetary disk, moving inwards. This usually happens early in the life of a planetary system, well before planets finish forming.
- Scattering, where a giant planet interacts with smaller planets or planetesimals, ejecting them to more distant orbits while moving inwards. This should happen later than type II migration.
It's clear that if hot Jupiters mainly migrate via scattering, the inner portion of a planetary system will be severely disrupted (see Mustill et al. 2015); any terrestrial planets would have to be much further out. However, it's possible that only the so-called warm Jupiters, which orbit 0.1 to 1.0 AU, use this method, while true hot Jupiters use type II migration to go even closer, according to Levison et al.
Whether gas disk migration would be just as problematic for terrestrial planets is up for debate. Some simulations (e.g. Fogg & Nelson 2008) imply that in such a scenario, material from the inner protoplanetary disk would be expelled into orbits outside the hot Jupiter's. Terrestrial planets could then form here, in a gentler region of the system.
The simulations by Fogg & Nelson indicate that volatiles from beyond the snow line would be mixed with the inner disk debris, leading to terrestrial planets with heavy elements and water. This seems to show some good prospects for habitability. Mandell et al. 2007 found that these planets would likely accrete icy planetesimals, leading to even more water; indeed, they could readily become worlds with oceans covering their entire surfaces. Some, in fact, could even end up in the habitable zone, with surface temperatures suitable for this water to stay liquid.
Fig. 2, Mandell et al. One of the authors' simulations. While most scattered protoplanets end up beyond the snow line, there's a chance for one or two to have stable orbits in the habitable zone.
Hot Jupiters often have their atmospheres ablated by the winds of their parent stars. This can result in atmosphere loss, forming a plume that trails behind the planet. My order-of-magnitude estimates indicate that this shouldn't be a problem for planets orbiting further out - and it certainly won't cause the ablation of their atmospheres, or some sort of mass transfer.
Does this happen?
We do have a couple examples of systems with hot Jupiters and terrestrial planets coexisting. WASP-47 is an interesting case. It contains two planets with masses slightly above Jupiter's - one close in, and one further out. There are also two terrestrial planets: one inside the hot Jupiter, and one between the two giant planets. This is a setup similar to some of the results of Mandell et al. In simulations with two giant planets, this sort of result was not unlikely. One giant could stay where it was, while the other migrated inwards. However, the furthest giant planet has an unusually high eccentricity relative to the other bodies, and so a more complicated mechanism may be at work.