There are other issues with having spell preparation as part of leveling. For instance, if your higher level or a stat boost increases the number of spells you can prepare, that isn't reflected in the part of the leveling screen that actually lets you prepare spells.

Since, at present, you can change your prepared spells any time you want, it might be best to remove it entirely from the leveling process and just have a reminder after you level up that you might want to update your prepared spells.