The legal remedy could be to legislate a fundamental right of all
children to school education and making it available free to those who cannot
afford it. Also, make it a punishable offence for the parent, if they fail to
send their children to school.
In a democracy, the right to freedom of speech is too sacrosanct to
compromise and you cannot do much about people speaking their mind. To
legislate against such freedom may be worse than the disease. It amounts to an
admission that the people of Bangla Desh do not deserve the rights in a
democracy, and what they need is an authoritarian rule.