What existed was a tribal society in which clans spread out taking with them their totemic dieties (possibly as identities).
From Purusha/Brahman, originated Brahma, from whose mind were born 12 rudras (shiva, the best) , 10 prajApatis [Brahmin sapta rishis in every manvantra/ universal cycle]. In that case, all were Brahmins [in the nature of being purely Spiritual/powerful and conscious of Brahman]. From the Sapta Rishis, were the different varnas/species of humans born. [Reference Rig Veda, Vishnu Purana]
So, all the deities were revealed through yagnAs to different rishis who sought after them rigorously, and were obtained the revelations of Rig Veda as various Suktams/hyms that detail the (nature/upAsanA/blessings) of gods.
Prajapatis/Sapta Rishis must have had the foremost knowledge that Brahman is the cause of creation. There was nothing like ishta-dEvata or anything, there were individual seekings/meditation at the beginning. A rishi could have composed hymns on many deities too and were imparted to the disciples. Overtime, they had known works from the lineage or closest proximity and each gotra became pre-dominatly associated with one veda, as studying them took longer time [like 20 years].
Our imagination may run wild, saying the gods were picked up over different periods or choices. But false, people split up over time, but carried with them the knowledge of the rishis' clan. Those ancient rishis might have spread across egypt to far east asia, which can be guessed from Dasaratha's details in Ramayana. Over time, as rulers/ change, they settled down in the ganges, seeking more fertile climate and those ancient groups that were left out came back to India in search of both wisdom and wealth. By then, our neighbouring tribes had different cultures, and would have come up with various interpretations of our vedic knowledge, like Aghoris, scary deities, taking up painful physical methods of worship (piercing/bali etc), wild tantra which were not vedic, but the tribes and their idea were absorbed in our pantheon in the name of Shiva. So, I would conclude, worshipping Shiva in the way of simple meditation rather than scary ways would still make him and us a Vaidika/Brahmin.