Regarding Hadith:

The Messenger of Allah has been quoted saying: If all people accepted Wilayat of Ali, I would have not created hell.
(Amaali-Shaikh Sadooq, p160)

– is this Hadith authentic?

– if yes, please explain how this will apply to the ‘common’ people who lived before Islam?
They wouldn’t be informed about the Wilayat of Imam Ali (as), how can then it impact the creation (or not) of Hell?

The hadith is authentic. Sunnis have also narrated this hadith in some of their sources.

As for people who came before Imam Ali (a), we say the following:

1- If previous nations loved their prophets and obeyed them, that indicates they had the Wilayah of Imam Ali (a) in general. When you love your prophet and obey him, you believe in his successors and in the continuation of his message, and that’s what the Wilayah of Imam Ali is about.

2- People who loved their prophets and obeyed them would love Imam Ali (a) if they knew him in specific and in detail.

Hence, pagans in previous nations did not love their prophets, which reveals that they would not have loved Imam Ali, which then explains why Hell was created.