How thoroughly should I scrape paint from cement basement wall before insulating?
It sounds like the adhesive only has to hold long enough to build the stud wall, and from then on the wall will be essentially holding the XPS in place. Similar to how batt insulation isn't attached and is just essentially sitting in between studs.
So I wouldn't spend more than a few minutes removing paint.
However, if the paint could later turn into &quot;mold food&quot; in your sometimes damp basement, then you might want to spend more time and remove it more thoroughly (unless it's already an anti-mold paint).

Possibly related Q mentioning anti-mold paint: How can I paint over mold to prevent it from coming back again?
Might be worth considering, when XPS could act as a vapor retarder / air barrier when taped