There are actually many factors that contribute this.
The main one however is that the paint within the can is pressurized to a point such that both gas and liquid of the paint exist. This is called saturation. When you shake the can, you are not only mixing these two, but you are increasing the pressure inside the can.
This however does not explain why the can still gets colder when you use the can which intuition would tell you should lower pressure inside the can.
The answer to that, is that the pressure does not actually change within the can. As you use the saturated material that is a gas, the material that used to be liquid begins to boil and becomes gaseous. This is why the can always releases the gas in a steady stream until it is near empty. The pressure stays the same.
However it takes a lot of energy to change the material from liquid to vapor. This is what causes the drop in temperature
Edit: fixed-
Minute Physics has an excellent video on this which I will link to below:
Latest Answers