Food is better at keeping its shape, air tries to expand, and our mouth is bigger than our throat.
Your esophagus is closed most of the way unless you are swallowing something. Typically your esophagus is used to pushing things down that are roughly 1/2 the size of a golf ball (solid foods).
When we swallow air we are taking all the air that is inside our mouth and attempting to push it into a shape the same size as that golf ball and shove it down our throat because that’s what our throat is used to. This pushes the same amount of air into a smaller space generating a larger PSI (pounds per square inch) than when you just have a mouth full of air.
That “pain” you feel is the air trying to readjust itself to it’s natural PSI.
If we focus on swallowing smaller bits of air like when you force yourself to burp then it’s not painful going down. You will also experience similar pain if you tried to swallowing larger pieces of food that same size. Food is better at keeping it’s shape and not expanding is the main difference why the same size food will hurt less.