Diminishing stepsize methods for nonconvex composite problems via ghost penalties: from the general to the convex regular constrained case