Why do eggs harden in boiled water but noodles get soft?
Heat causes the protein in eggs to form longer molecular chains. Think of the molecules as like short segments of string that can slide around each other but are too short to become tangled. The heat turns them into long strands which grab and hold each other on the level of our perception it gels.
Pasta in the dry state is relatively short molecules but they are sticky and tend to cling to each other. When you put them in water it acts as a lubricant and lets them slide on each other. The pasta swells from the absorbed water and becomes flexible. Pasta will get soft in cold water as well as hot, it just takes a lot longer because the molecules aren’t as energetic.