The guidance Ophelia gets from Polonius is haphazard, at best. He cares about some things (those which might affect his political position and ambitions) but not about others. He uses her to advance his own causes but seems to care little about her in any ways that matter. This eventually causes both their deaths.
Hamlet's actual parental guidance in the play is limited to his mother, who apparently abdicates her role once she marries Claudius. She does re-engage with her son late in the play, but it's too late to be of any help to Hamlet. He does get some ethereal parental guidance form his father's ghost; however, it is his request for revenge which eventually gets Hamlet killed.
I think both characters are given parental guidance of a sort, but the question is "are they able to carry it through?" Polonius does give guidance to Ophelia about her relationship with Hamlet. He is rightly concerned that Hamlet may be only using fine words to get what he wants from her and that as a man, he "has a longer leash" in regards to his behavior with the opposite sex. Ophelia only has her reputation, and he warns her not be foolish in regards to that. The problem is, Ophelia is genuinely in love with Hamlet, and turning away from him is difficult. Her heart is broken when he speaks harshly to her and of their relationship in the "get thee to a nunnery" scene. Ophelia knows how her father feels about her feelings for Hamlet, so she is left alone to process all she has been through and loses her mind in the process.
Hamlet, on the other hand, receives his fatherly advice from the ghost of his dead father. He is told to avenge the murder and leave his mother's guilt to "prick her." These are two overwhelming tasks for someone who is ill-prepared to carry these out. The ghost doesn't offer any concrete suggestions on how to actually accomplish either of these goals, so Hamlet has to figure all that out for himself. These are not tasks that one can prepare for, and Hamlet is troubled by the responsibility. He makes his feelings clear when he mutters, "O' cursed spite that ever I was born to make it right!"
In concurrence with the above post, Ophelia is an impressionable young woman; when Laertes gives her advice, she promises to follow it, and when her father advises her, she likewise promises to obey. Impressionable and pliable, Ophelia is far too ingenuous to be able to understand the motivation behind Hamlet's cruel words. Indeed, she needs a strong parent to advise her and guide her actions.
And, because Hamlet has only a ghost to talk to, a ghost he is not really certain about, he engages in lengthy and obsessive debate which probably could have be shortened with adult counseling.
This is an interesting question. I think that the lack of guidance for Ophelia and Hamlet possess significant impact on the choices that both characters make. Essentially, Ophelia is left without anyone to really advocate for her. She understands that her emotions for Hamlet are intense and that the situation that surrounds them both is equally volatile. Yet, the lack of an advocacy structure for her is what helps to doom her because she cannot understand Hamlet's cruel and inconsistent reactions to her and why he does what he does. Ophelia requires someone who will listen and advocate for her, providing counsel and insight, as opposed to her father, Polonius, who simply sees her as a manipulative tool and her brother, Laertes, whose devotion to her arrives too late. Hamlet is someone wrestling with the intensity of emotions and politics without anyone reliable towards which he can turn. This is critically important. Hamlet's complex feelings towards his mother and his equally intense ruminations in his own mind require some type of counselor or advocate. He lacks these and this causes him to engage too much in surmise and then incorrectly presume the basis to act. In the end, Shakespeare might be suggesting that while one of the virtues of young people is their capacity to feel and to act, these are realities that can best be understood with some type of guidance or advocacy structure that allows these virtues to not become vices.