While Hester Prynne in The Scarlet Letter ostracizes herself from the community following her punishment, she does so with a motivation of working out her atonement for her Puritan crime of adultery. She was clearly wrong in her conduct and choices. She accepts her guilt. She accepts her punishment and she establishes her life in such a way that she might atone and be separated from those who scorn and continually chastise her.
Melinda Sordino in Speak is ostracized by her classmates, it is not with her own volition as Hester's choice of an isolated cottage is. Her classmates are angry with her for bringing the police to a party where illegal and harmful underage drinking was going on, and so they punish her for spoiling their fun by making her an outcast.
In response to the horrific event that disrupted her life and sense of reality, which occurred at the party, Melinda stops speaking, feeling a painful constriction on her throat. Her motive for this, if it can legitimately be said she had a conscious motive, is to protect herself and keep her secret that stems from events that night. Melinda is not motivated by a clear need to atone as Hester is nor is she motivated by a choice to stay and face a punishment given by the community's legal justice system.
The main differences between the two, Hester and Melinda, is that Melinda's reaction of not speaking is in truth a psychological reaction to shock, trauma, violence, and abuse. Hester's motive arises from a known violation that was punished according to community laws and distributed according to justice. While Melinda has some guilt feelings for having been at the party and for having been drinking, drinking and physical violation are two very separate things and of two entirely different natures.
In other words, drinking does not equate with physical violence; in general terms as they relate to Speak, drinking is something one does one's self, while physical violation is done by someone else. So even though Melinda feels guilty for the one thing (drinking), she was not a participant in the other thing (violation), she was a victim in the other thing, and therefore does not have the kind of guilt that Hester bears.