The light coming from a single hydrogen molecule is red shifted because the hydrogen molecule has mass…not much mass, admittedly, and the amount of red shift is going to be extremely challenging to measure but it’s there.
Most of the hydrogen molecule is space. If the electron in a hydrogen atom orbited at the far end of a baseball stadium then the nucleus would be the size of a grain of salt on the pitcher’s mound. Likewise, in a gas, if we were seeing the hydrogen molecule as the size of a star then other hydrogen molecules would be far far away on average, even further if the gas heats up.
But if that hydrogen molecule is part of the gas which is a star then the light coming from that hydrogen molecule is now very measurable indeed as the mass of the entire star contributes to the redshift of our hydrogen molecule even though that molecule is, in its own world, far from other molecules of gas.
If we start our journey near the hydrogen molecule and then move away to the distance of, say, the Earth, we will note an increase in the redshift of the light from that molecule as we proceed. What if we continue?
As we exit the Milky way the redshift of the light from that molecule in the sun is further redshifted as now it is light from a galaxy and not just a star or a single molecule. As we proceed further away we receive light from a cluster of galaxies, our Local Group, and then the local supercluster of galaxies.
Returning to our molecule in the star we note that particles to the left, the right and all around the target molecule contribute to the mass as well as molecules behind and in front. Molecules in the entire region contribute to the mass of the star and this contributes to the redshift of the light from our target molecule.
Thus as we move further away the contribution of clusters of galaxies in an ever bigger area contribute to the increasing redshift of the light from our target molecule. Think of a patch of sky the size of the sun as seen from Earth as contributing mass and therefore to the redshift. With ever greater distance there are ever more galaxies occupying that same footprint in the sky.
That redshift will increase with distance in a flat universe is not the question, it does and we have measured it locally (redshift from the sun verses redshift from a single molecule). The only question is how much this phenomena contributes to the cosmological redshift that we observe ~ a little bit, a lot, or all of it??
Note that if we zoom in on just one molecule of a gas in the sun we will still measure the same redshift, that is, the entire sun’s mass produces the redshift whether we are focused on one molecule or the entire sun. Likewise when we focus in on just one galaxy far away we see the redshift contributed by nearby galaxies, ever more contributing with ever greater distance from us.
Note also that the fact that there is just as much mass behind us as in front of us does not reduce the amount of this form of redshift. If there were another sun equidistant from us so that the Earth was between them then we would measure redshift from both bodies in much the same way with only a very modest reduction in redshift.