Why is ethanoic acid more acidic than phthalimide?
The deprotonated phthalimide anion is indeed highly delocalized, but the neutral molecule with the N-H proton reattached retains most of that delocalization.  Protonating acetate ion back to acetic acid causes a much greater loss of delocalization.