So we have a lot of questions that start with “Can the DM..?” that I answer with No. This is another one.
The rules themselves give the DM authority to change the game to improve the game. There are no explicit limits given—that would defeat the point—but there is an inherent limit given by the very nature of the game being a game and the purpose of the tool being to improve the game.
And that limit is whether or not people are still willing to play the game. That limit is whether or not the game is still fun for everyone.
So the question really is, can the DM do this and still find people to play? My answer would probably be No, hence the opening line of this answer. Choosing my spells is a big part of what makes playing a spellcaster fun for me—choosing what my character focuses in and trains for, generally, is a big part of what makes the game fun for me. Taking that away leaves me uninterested in the game.
Could there be exceptions? Yes, of course. As @PhilBoncer’s answer says, there’d have to be good reason for this—very good reason. It would take a lot to convince me.
And if the DM didn’t convince me—or worse, didn’t think he had to, and expected me to simply accept his dictum—then I would politely excuse myself from the group. I recommend you take the same approach: explain to your DM that this doesn’t sound like a game you’re interested in playing, that you don’t see the upside to this change in the game rules. Allow him to try, if he likes, to convince you. But don’t be afraid to say No, that doesn’t sound fun to me, and walk away. No game is usually better than a bad game.