What did Jesus mean by saying "the works of God might be displayed" in the man born blind? John 9:1–3
As he passed by, he saw a man blind from birth. 2 And his disciples
asked him, “Rabbi, who sinned, this man or his parents, that he was
born blind?” 3 Jesus answered, &quot;It was not that this man sinned, or
his parents, but that the works of God might be displayed in him.&quot;

The line

It was not that this man sinned, or his parents

corrects the incorrect premise of Jesus' disciples, but what is meant by

the works of God might be displayed in him?

Is it that since he's blind, people ought to be sympathetic and such sympathy is the work of God?
Commentators tend to take two views: that the works of God refer to 1) Jesus healing the man or 2) God's working throughout the man's life.  Your suggestion fits nicely into the second option.

Representatives of the first view include John Gill:


  That is, that Christ might have an opportunity of working a miracle in the cure of him (source)


Adam Clarke similarly focuses on the current event of the healing and salvation of the man:


  [The blindness] shall now become the instrument of salvation to his soul, edification to others, and glory to God. (source)


Thomas Aquinas distinguishes between several types of afflictions, two of which being to "encourage virtue" and "manifest the divine glory." He thus sees them as distinct, and sees this passage as an example of the latter, via the healing of the blind man. (source, §1302 ff.)

Representatives of the second view include Albert Barnes, calling attention to providence acting throughout his life:


  By the works of God, here, is evidently intended the miraculous power which God would put forth to heal the man, or rather, perhaps, the whole that happened to him in the course of divine providence first his blindness, as an act of his providence, and then his healing him, as an act of mercy and power. (source)


But John Calvin clearly points to the man's blindness in itself as being a way for God to teach others:


  He does not, say a single work, but uses the plural number, works; for, so long as he was blind, there was exhibited in him a proof of the severity of God, from which others might learn to fear and to humble themselves. It was afterwards followed by the benefit of his cure and deliverance, in which the astonishing goodness of God was strikingly displayed. (source)


Though he does not specifically mention your idea of it encouraging sympathy in others, that concept fits nicely with this understanding of God's work in the blind man.