Well first, that isn't the primary problem with hypersonic flight. Hypersonic flight is much more complicated than that.
With hydrogen, you will likely kill everyone involved. Filling a tube with hydrogen and putting a rocket in it will just ignite all the hydrogen in the tunnel.
Additionally, putting all that air in a tunnel will INCREASE drag since you will have wall/blockage effects. You would make the problem worse.
Also, density is not the only important factor in the drag on an object. Viscosity is also important, so you may end up just making things worse.
Rocket travel is not a very efficient way to move and it generally isn't cheap to do in a reusable way, so this project would be very expensive. Air breathing propulsion would be a better choice, but that requires oxygen, which your tunnel won't have.
How do you plan to steer this object through the tunnel? If you are putting it on a track then this just amounts to a rocket-propelled train. If you think it will control like a plane, then you will kill people that way too, as control is one of the chief barriers to hypersonic flight. It would be very tough to not slam into walls.
Also, you won't dissipate shockwaves using a foam wall. That would reduce reflections a bit, which may give a slight benefit, but the shock will be just as strong as ever until it touches that wall.