100% polyester fabric is more wrinkle-resistant than cotton. However, it depends on the thickness of the material and the weave.
The fuzziness/stretchability contributes to the "memory" of the fabric of the material, allowing it to retain its original shape even after many years. Thin fabrics like pure silk, chiffon, and taffeta won't keep their creases crisp for more than a day; you'll need to take them to the dry cleaner (unless they're made from heavy silk or twill).
Therefore, the high spandex content makes 100% polyester pants more wrinkle-resistant than similar pants made from 100% cotton. However, the percentage of polyester in the blend is more important than the spandex content, as high elasticity comes at the expense of less wrinkle resistance.
If the polyester fabric is washed in hot water on a regular wash cycle, it will wrinkle during the spin cycle of the washing machine. However, if a permanent pressure wash cycle is used, the garments are cooled before entering the spinning cycle. This reduces wrinkles.
In a regular dryer cycle, the temperature remains elevated throughout the drying process. In the case of a permanent press dryer cycle, the temperature starts high and then cools down to cool. This reduces wrinkles.
Polyester fabrics undergo changes in physical properties at a characteristic temperature called the glass transition temperature. Below about 70 degrees Celsius, the long chain-like molecules in the polyester fabric are locked in place. Above this temperature, the bonds holding the chain molecules in place break, and the molecules are free to move. If the temperature drops below 70 degrees Celsius, bonds form between the molecules again, holding them in place.