Shape invariance of N-compactifications