The meaning most supported in this scene is that he wants her to retreat to a convent, safe from the corruption of the world.
This is supported through Hamlet's dialogue because most of it puts the blame on men, rather than Ophelia herself. He does, at one point generally put women down when he says "God has given you one face, and you make yourselves another: you jig, you amble, and you lisp, and nick-name God's creatures, and make your wantonness your ignorance," but this is the most aggressive he gets towards women.
Most of the time he is blaming men for the wickedness in the world. He says things like "s as I do crawling between earth and heaven? We are arrant knaves, all; believe none of us." He also references her father, and seems to know that Polonius is watching them. His violence towards her becomes a show for him, further proof of his trying to protect Ophelia from all of the wickedness (including his own) in the world.
He has been lead to feel this way because through the first two acts he is realizing the impurities and inconsistencies of the way other people feel and act. He sees his uncle's crime and his mother's marriage as proof that people are prone to evil which is tainting his view of marriage in general.