In this kind of fanfiction, Cedric might feel shocked and angry. He could decide to protect Harry from further harm. Maybe he'll try to find the abuser and put a stop to it.
He might be shocked at first. Then he could feel a strong sense of protectiveness towards Harry. Maybe he immediately tries to find ways to keep Harry safe from further harm, like staying closer to him at all times.
Cedric would be deeply troubled. In the wizarding world, they have their own code of honor and respect. Finding out about Harry's abused fanfiction would go against everything Cedric stands for. He might start to question the morality of the Muggle world that allows such things to be written. He would also feel a sense of sadness for Harry, knowing that someone out there has created a story that portrays him in such a negative and harmful light. Cedric might even consider taking some sort of action, like talking to Harry about it or trying to get the fanfiction removed if he could, though that would be a complex matter given the nature of fanfiction and the different worlds they live in.
In the fanfic 'Malfoy's Revelation', Malfoy is paired with Harry for a project. As they spend time together, Malfoy notices some strange behaviors from Harry, like flinching at sudden movements. After some snooping around, he discovers that Harry has been abused. This new knowledge makes Malfoy more empathetic towards Harry and he tries to help him in his own way, which includes standing up for Harry against some of their mutual enemies at Hogwarts.
His life changes significantly. Firstly, he no longer has to hide the abuse. He can be more open about his feelings and experiences. This could lead to him getting the help he needs, like emotional support from his friends.
Well, first of all, the students would probably be shocked. His friends, like Ron and Hermione, would be extremely angry at the Dursleys. They might try to comfort Harry more often. And the school itself could start providing special resources for Harry, such as counseling or extra protection spells. Also, there could be a big change in the way the wizarding community views Harry. Instead of just seeing him as the 'Boy Who Lived', they would see him as a victim who needs support.