Although it should certainly get the heck out of scorched land, I'd try to avoid having it simply run deeper into enemy territory, even if it sees a smaller stack. They'll reinforce slowly and have no where good to retreat to should they need if they run into enemy territory. Not to mention that "pathetic 10 regiment" can (and in my case, usually is) a lure to simply have 3-4 more stacks pounce into the fight a day after the enemy arrives and eats terrain penalties.Example: My pathetic 10 regiments are watching 40 enemy regiments perish in an adjacent, scorched province. Logic dictates that the enemy home in and crush me and then disperse throughout the immediate vicinity to take my land.
Two biggest improvements for army AI would be simply get out of scorched provinces, and avoid doom stacks to begin with. Saw an 80 regiment Great Britain stack in my Austria game. Looks scary, but simply avoiding it and letting it chase things around while I ran in behind to take stuff caused pretty severe war exhaustion. The bigger issue for the AI though is on the strategic level. This comes to three main issues which have already been stated really.
A: It likes to leave it's home lightly defended while it conquers worthless desert lands (Castille being the biggest offender, but far from the only one).
B: War exhaustion, between doomstacking and war taxes, the AI is a master of ramping up obscene war exhaustion for even the smallest of wars. Combined with A, their nation tends to get smacked around by rebels.
C: Just give up already! The AI really seems to enjoy fighting to the very last man, even if all you want is one province. I've seen the AI refuse to cede even a single province at 30-40% warscore and held out until they hit bankruptcy on top of their maxed war exhaustion. This is especially noteworthy in cases where the AI feels you can't conquer them, but has no way to re-secure much of their lost land (Ottomans split by a blockaded straight, colonial powers, a Great Britain with many mainland holdings). Even outside of those though, I've seen some nations such as France hold out from giving a single province until 80% war score or more in some more extreme cases. This creates a massive dogpile effect and pretty much destroys the nation for the rest of the game.