How does bleed air maintain pressure for pressurization after being cooled?
That's one of the reasons why bleed air is compressed again before cooling.


  In Air Cycle Machines, high-pressure bleed air from the engines is first passed through a compressor, further squeezing the already hot gas. It is then routed through a heat exchanger or two to remove heat. The now cooler but still highly compressed air then passes through an expansion chamber into a larger chamber. The combined effects of driving the turbine and expanding into a larger chamber dramatically cools the air (usually down close freezing; water traps are critical in the system to prevent freeze-up). (Source)


Simple diagram:



(Source)

The outflow valve is what regulates the pressure, it makes sure the right amount of air leaves the cabin.


  The automatic controller normally maintains the proper cabin pressure altitude by constantly adjusting the outflow valve position so that the cabin altitude is as low as practical without exceeding the maximum pressure differential limit on the fuselage.