Anastasia is right, you can't always use them interchangeably. I've been trying to figure out what the rule is, and I *think* it's that "pretty well" has to function as an adverb, and can only modify verbs or adjectives, not nouns or noun phrases. By contrast, "pretty much" is a lot more versatile, and can work as either an adverb or an adjective. So "pretty much" will work in almost any case, but "pretty well" only works in some cases.