Yes, Hubble is not sensitive to IR and has a tube it resides in.
JWST cannot allow sunlight to touch anything this side of the Sun shield or it would get hot and then send IR onto the mirrors, warming them.
JWST can basically look 90° sideways from the Sun. From there it can only tilt 5° toward the Sun but can tilt 45° away from the Sun. The difference is due to the particular shape of the Sun shield.
And, no, it cannot look at Earth, Earth is too close to the Sun. They are always in a straight line, Sun, Earth, JWST. Even the Moon, as it orbits the Earth is too close to the Sun.