AI can be leveraged by an human designer to do that with some effort. Like, humans may have good taste in level design and AI may explore the concrete possibilities.
AI might be able to do this in the future by itself
AI models might be able to do this in the future by themselves, though with current paradigms AI will barely generate copies of existing levels with little creativity. Sure, a composition of existing level pieces could lead to an interesting level design, though it would be more by accident than by design. Models do not maximize player enjoyment, there is no metric for that. Maybe engagement metrics could be used, but I don't think players would stick around long enough playing bad levels to reach a viable model.
New models and paradigms will come up, but until then I'd say anything AI-generated will feel pretty vanilla and somewhat incoherent.
AI can be leveraged by an human designer to do that with some effort. Like, humans may have good taste in level design and AI may explore the concrete possibilities.
AI might be able to do this in the future by itself