According to The Force Awakens: Rey's Story, Rey was reading Ren's mind when she talked about Vader. There's no particular indication that she knows who Darth Vader is or how powerful he was, other than what she's pulled out of Ren's thoughts.
That being said, she's been raised on legends of the Jedi and certainly knows who Luke Skywalker is, so it's at least possible that Vader was at least mentioned in those stories.
This time Rey met his eyes. She pushed back against his probing thoughts, harder and harder, until the pain in her head suddenly disappeared. A flash of surprise crossed Kylo’s face, and Rey pressed her advantage. She reached out with her mind, entering his thoughts.
“You…you’re afraid that you will never be as powerful as Darth Vader!” Rey smiled in triumph.
The Force Awakens: Junior Novelisation strongly implies that she saw Vader in her earlier vision, but didn't know who he was, nor does she give any indication that she recognises his name.
She turned his tendrils back at him. His feelings and memories were easy to read. His mind was a turbulent ocean of fear. “You, you’re afraid. That you will never be as strong as—” She hesitated. An image of another man in a black cloak and mask dominated the maelstrom. A silhouette she had seen in the vision below Maz’s castle. He had a name. “Darth Vader.”
The official film script concurs, but again, offers no specific confirmation that she knows who Vader is, prior to this moment.
DESPITE THE PAIN SHE IS STRONG.
On Ren's face as HIS CONFIDENCE BEGINS TO MELT AWAY. He has slammed up against a barrier in her mind. He looks less certain by the moment as Rey seems to GROW IN STRENGTH. The FEROCITY of confrontation builds until it hits critical mass
AND REY DOES THE UNTHINKABLE! SHE ENTERS HIS HEAD, AMAZED AT WHAT SHE IS SEEING!
REY: ... You... you're afraid... that you will never be as strong as... Darth Vader!
KYLO REN SUDDENLY WITHDRAWS HIS HAND, as if her face were FIRE HOT. TAKES A STEP BACK, CONFUSED, RATTLED. Rey's body is released, she breathes deeply, her powerful eyes still on Kylo Ren, who starts to leave.