You have to feel the same pain to love someone? Did Hinata feel the same loss? Didn't she started stalking Naruto at first because she thought he was a loser like her. Of course, she found out Naruto was hard working and tried to change herself too and all that jazz. But she only watched the heroic side of him for the most part. It worked for her. But that's all. It's not like is ever going to ask why or how he was able to forgive Obito. She is just going to adore Naruto for being able to. Or do you think she will feel shocked and tell him he shouldn't have?
Yes you actually do have to feel the same/similar pain as your lover/friend. That's what makes a relationship, they can usually relate to each other like no/limited of other people. Naruto had the same feeling as Obito, they never had parents when they were young, limited if not 0 friends, had the same dream, lost people that was important to them (Naruto and Jiriya, Obitio and Rin). Hinata was always in a clan. Hinata also had a mess up childhood.
Here father thought that she was a failure, which is why her father took the her position as the clan's heiress and gave it to her sister Hanabi. Which is why she would often run off by herself in the woods crying like we seen in the flashback during Pain arc when she rescue Naruto. Hinata was also almost kidnap as a child, which her Uncle (Neji's father) died fighting the kidnapper sacrificing himself for the clan and village right before the treaty signing. Which caused Neji hating her and you seen what happen in Part 1 so you should know the rest.
So yes Naruto and Hinata both felt neglected and often alone. They both have a mess up childhood, even though one had it worst than the other, they both can relate.