How does a girl feel after rejecting a guy and realizing later that he was nice?
I assume the girl in your scenario rejected the guy in question knowing he was nice.
I can’t imagine she rejected the dude in question and then decided his niceness factor made her regret her decision.
Obviously if you’re a straight-up asshole, you’re not nice and she was right to reject you.
If you pretended to be nice and she later found out you were an asshole, the scenario you posed doesn’t apply.
If you “negged” her as part of some PUA nonsense and you later regret your tactics, you weren’t nice at the time. If you keep up the PUA nonsense, you’re still not nice.
If you believe “niceness” entitles you to friendship, love, romance, and sex, you aren’t really nice.
The brutal truth is that plenty of nice people get rejected simply because others don’t fancy them. If you stay nice even when this happens, you’re a genuinely good person.