Pacifist is too broad and too general to be a class concept. Pacifist is a feat that regulates the behavior of presumably many classes in exchange for some sort of benefit. In general, in my opinion, the feat would largely be an 'NPC Feat', in that it explains certain aspects of the in game universe and offers obvious benefit to some persons within that universe - who have a different role in the universe than the one presumed or default for PCs. You could have pacifist clerics, pacifist paladins, pacifist bards and so on and so forth. Most of these concepts are of questionable viability as PCs, and I would generally discourage all but the most experienced players from pursuing them.
A base class represents an entire role within the in game universe which is both distinctive and important. A class is an aspect of society manifested by its culture. It's possible to write up a base class in too narrow of a fashion, but in 5e you will helpfully discover that your base class concept is too narrow when it has or you can imagine only one archetype. Classes have much more going on than simply being 'pacifists'. A class should only exist in the campaign world if members of that class are frequently manifested within the culture. For example, only cultures where war is known will manifest 'fighters', and only cultures with religion will manifest 'clerics'. Of course, this is practically every culture we can imagine.
A reasonable starting point of a base class would be to imagine a culture where persons make a pledge of pacifism for some heroic purpose and are commonly observed in every day life and where these persons are expected to thwart tangible (rather than abstract) manifestations of evil. Let's call this call 'Protector'. 'Protectors' forgo violence (to some degree) in exchange for power that results from the forgoing of violence. In D&D, for this to be viable you've got several different approaches that you can use in combination:
a) Protectors are Bricks. A protector by forgoing violence becomes highly resistant to violence. They gain traits like resistance to damage, immovability, and so forth.
b) Protectors are Healers. By forgoing violence, the Protector is better able to access healing life energy.
c) Protectors are Righteous. By forgoing violence, the Protector gains an aura of holiness which passively thwarts evil and drives it away.
d) Protectors are masters of nonlethal violence. Protectors that haven't fully given up violence, are masters of grappling and controlling foes without resorting to lethal force.
'Pacifism' is a very broad term, and includes various different degrees to which you forgo violence. Some Protectors forgo only deadly violence, or forgo only violence against other free willed sentient beings (and not say unintelligent undead or constructs). Obviously, the more violence they forgo - and/or the more restrictive their vows - the more power that they are able to access that pertains to forgoing violence. You'd have to work really hard to balance this well, because players will tend to try to subvert the rules. For example, nonlethal damage is just as lethal as lethal damage when used alongside someone else engaging in lethal damage. And a vow of pacifism that allows the Protector to engage in violence against (unintelligent) animals, (unintelligent) beasts, oozes, (unintelligent) plants, aberrations, constructs, undead, and evil outsiders might in practice rarely come into play in some campaigns because that list might well encompass most of the foes that the party would expect to face.
I wish you luck in your endeavor, but I feel your initial design is too simple and rather uninspired. You need to right up something with more details, and not simply handwave away the spell list by saying it contains 'all spells'.