The SC2 AI will scout and it will respond to what you do during the specific game in question, but the knowledge doesn't carry over into different play sessions.
The closest thing the AI does to "learning" on normal maps is what happens when you play on Insane difficulty. In this mode, the AI is known to cheat in two ways:
- It gets more minerals per worker trip than normal
- It always knows where your units are and can create counters to your units as you are building them
Regarding Left 2 Die, the more difficult settings do not learn between play-throughs. If you employ the same strategy in one session on Brutal, it will get you just as far in another play session as well.