From Organizer.org, this example of an individual being forced to write a text with a particular message:
"One person arrested, named Bacchu Mondal was forced to write after custodial torture that he out of his own will had immersed the Holy Deity. After that the police itself did the act of immersion."
From Cybernoon.com, a message said to be more generally coerced out of a new agency:
"That the Prime Minister’s Office has not so far taken any cognizance of the matter comes as a surprise. Even more surprising is that the Congress party seems unaware of what is going on in Andhra Pradesh. Muzzling the media seems to be the order of the day that even ‘The Times of India’, usually a defender of the Establishment was forced to write a strong editorial (January 8, 2007) against the Ministry of Information and Broadcasting that said that “there is no place in an open society for a ministry that muzzles the media by laying down draconian, and often ludicruous, guidelines”."
At Screendaily.com, reference to the film Memento in which the character "Chris is forced to write everything down to make sense of the most mundane activities of daily life." In this sense, faulty memory forces us to keep track through writing.
Ifaonline Media has a piece describing a situation that compels a certain form of writing:
"NU has in the past received serious criticism from financial advisers and customers about the quality of its administration handling – more specifically in 2005 when the firm was forced to write to advisers about the quality of its admin - in part because of the huge number of legacy systems the firm has to manage and integrate."
What I've been looking for are recent news articles about students being forced to write lines, but the single most common use of the phrase "forced to write" in the news media has to do with accounting: being forced to write off debt—that kind of thing.