Would it be unethical to claim affiliation when it was not made official yet?
Affiliation should indicate the institution with which you were affiliated while doing the work and writing the paper.  If the paper was already finished before you started at an institution, then don't list it; use your previous affiliation instead (or "none" if you weren't affiliated with any institution).

If you end up making significant revisions to the paper after enrolling at the new institution, then you could consider listing both it and your previous institution.

If it matters, I wouldn't necessarily use the "official enrollment" date to decide when affiliation starts, but rather the date when you actually started attending classes, using the institution's facilities, etc.