Well, Cedric is a good - hearted character. When he finds out Harry is being abused, he would probably be angry at the situation and the abusers. He would try to use his influence among his friends and in the school to make sure Harry has a support system. He may offer Harry a place to stay away from the source of abuse if possible, and he would constantly check on Harry's well - being, both physical and mental. He'd also encourage Harry to speak up about the abuse so that proper action can be taken.
Cedric would likely be horrified. He might start to question how he hadn't noticed before. He could then confront those he suspects of the abuse or try to get help from the proper authorities within the wizarding world, such as professors who he trusts. He'd also be there for Harry emotionally, listening to him and reassuring him that he's not alone.
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.