Here there are two issues: free speech and the judicial system in Brasil. I’ll reply to the later in a different mail.
The freedom of speech is the result of democracy. No democracy, no freedom of speech. It is also inherent part of the democractic process.
On the other hand, it is not the only element of a democracy. and it can also be used against these other elements?
My question to you: can you use a fundamental freedom, granted to you by the fact you line in a democracy, to attack democracy?
One of the basic elements of a democracy are three branches. In fact, democracy is an inherent instable system where these three branches must keep eachother in check. A natural concequence thereof is that every one of these three branches has the right to conduct and lead investigations.
That the courts can act proactive or reactive is more a cultural element then a core element of democracy. There are quite some countries where judges are part of the investigative process and can unilateral.
As Brazil, as a number of other countries in Latin America, has been in the situation in the past that both the gouvernement and the parlement are controlled by people with a … euh … not so good reputation on their democratic values, a judicial branch that acts in a more proactive manner should not be that IMHO unexptected.