I think ninja's speed boost should be directly related to the armor rather than to the class. This can be achieved by giving the black ninja tunic a 20% speed nbt tag rather than giving the player a permanent speed I effect. To try this yourself, input this command into a command block and herpaderp around.
/summon Item ~ ~1 ~ {id:"Item",Item:{id:299s,Damage:0s,Count:1b,tag:{AttributeModifiers:[{Name:"Modifier",UUIDLeast:-8172296050831890596L,Amount:0.2d,Operation:1,UUIDMost:1971054349213714615L,AttributeName:"generic.movementSpeed"}],display:{color:0}}}}
/summon Item ~ ~1 ~ {id:"Item",Item:{id:299s,Damage:0s,Count:1b,tag:{AttributeModifiers:[{Name:"Modifier",UUIDLeast:-8172296050831890596L,Amount:0.2d,Operation:1,UUIDMost:1971054349213714615L,AttributeName:"generic.movementSpeed"}],display:{color:0}}}}