Your understanding of Bernoulli's equation is correct, but the situation in a compressor is more complex, because energy is being added by the rotating blades.
When subsonic flow decreases in speed, and no energy is being added, the total pressure remains the same. This means the static pressure must increase, because the LHS of Bernoulli's equation isn't changing:
Pt = Ps + 1/2 x rho x velocity ^ 2
But, in the compressor, the rotating blades are adding energy from the mechanical work they are doing on the fluid, and hence the total pressure increases. So, while the above equation still holds, the LHS is now increasing. The static pressure is then given by the isentropic compressible flow equation:
Pt = Ps x (1 + 0.2 x Mn^2).
When someone talks about "pressure" changing, they need to be very clear if they mean static or total pressure.
What the compressor is doing, is increasing the total pressure. Total values are the measure of energy in the flow. But because the Mach number stays about the same from compressor inlet to exit, the static pressure goes up also. But, this isn't really important, increasing the total pressure is the significant factor. Total values represent the energy content of a fluid, because as you can see in Bernoulli's equation, the energy content can be traded between the velocity term and the static term as the fluid speeds up or slows down, but this is just shifting energy from one form to another, it's not changing the total energy content.
As the air in the compressor is being compresssed, it actually needs less space, as your intuition would suggest. A complicating factor is the air temperature is also increasing, so it's not just the same volume of air at only a higher pressure. But, if the compressor expanded as you suggest, the velocity would decrease too much, and then the air flow over the rotor and stator blades would be too slow. This would cause them to loose their aerodynamic performance. The rotating blades would be ineffective in adding energy, and the blades would stall, as the rotational velocity would be too high in comparison with a low axial velocity. A high rotational velocity of the blades and low axial velocity of the air makes the angle of attack of the air on the blades increase. They stall like a wing on an aircraft going slow at a high angle of attack. When the air in the compressor stalls, it no longer wants to flow in the direction of increasing pressure towards the combustor. It reverses direction, and flames can even come out the front of the engine. Not good!