As far as I know, this has never been explained. However, we may be able to make some inferences.
Doduo and Dodrio, both multi-headed Pokemon connected by one body, have separate brains for each head.
Zweilous also has one brain per head, evidenced by the fact the two get in disputes constantly.
As Weezing is essentially two Koffings, one can assume that they also have two brains.
Do you see a pattern here? All these multi-headed Pokemon each have a brain per head. Therefore, it can be safely assumed that each Alolan Exeggutor head has its own brain.
Hope I helped!