That second innings wasn't great, but I don't see it as the primary reason why we lost. I put that down to letting Pakistan escape from 177-7. A score of 344 was miles above par on that wicket.
Setting Pakistan a chase of, say, 200 I think would have been a tough test for them. And if we'd had a reasonable 1st innings lead, we would likely have done that.
Leach in particular was disappointing, to only take 1 wicket in 31 overs during that innings. Given that his bowling is the only thing he was picked for, that was an awful return. Shame that the selectors didn't have any other left arm spinners to pick from in county cricket, ideally one who can bat too and has just had their best ever season.