It's brought in Likutei Moharan II:8 (R' Nachman of Breslev's final lecture) ideally by prayer and "shining forth of the sun" healing and forgiveness of sins are attained and neither Yisrael nor the Tzaddiq/Mashiach need suffer. But if not then one or the other could suffer, God forbid. Accordingly some (or the main) perushim for example Rashi (Isa. 53:3) comment the "suffering servant" is all Yisrael referred to as one man.
Summary of Ot 6 (Waw): Revelation of God’s glory, like "the shining forth of the sun," leads to healing and forgiveness of sins, for sins are like darkness. All this is attained by prayer, which gets multiplied by adding a "neighbor" (Shakhen) to the prayer congregation. But when the prayer is not fit, the Tzaddiq may suffer for the people, God forbid.
The lesson is further interwoven and Mashiach is mentioned in Ot 10 (Yud).
And this is like healing, for all the aspects mentioned above are like healing. For revelation of the honor mentioned above is like the shining forth of the sun, like (Isa. 60): "And the glory of Hashem is risen upon you;" and through the shining forth of the sun comes healing, as our Rabbis of blessed memory said (Baba Batra 16): "As the day advances, the illness lightens," as is written (Mal. 3) "And unto you who fear My name shall the sun of righteousness and healing shine forth." For the spirit of prophecy which spread out via the revelation of the honor, this is like the healing that comes through the shining of the sun, like (Prov. 18): “The spirit of a man will sustain his infirmity." And the main revelation of the honor is through the prayer mentioned above, which the clouds, which are the Other Side and the husks, are annihilated and go away, and then converts are made, and the honor is revealed as mentioned above.
And this is like forgiveness of sin, which comes through much prayer, through which the sun shines forth, through which healing comes. For sin is like cloud, which darkens the light of the sun, for the nature of the sins is they are like darkness, as is written (Isa. 29): "And their works are in the dark;" and this is like sickness, for the main source of sickness comes from sins, as our Rabbis of blessed memory said (Shabbat 55): "There is no affliction without there being sin," for it is said [Ps. 89:33]: "Then will I visit their transgression with the rod, and their iniquity with stripes;" for the sins are like clouds, which darken the light of the sun, through which the healing is, and through the prayer the sins are atoned, for prayer atones, for it is in place of offering (Berakhot 26b): as is written (Isa. 56): "I will bring them to my holy mountain, and make them joyful in my house of prayer: their burnt offerings and their sacrifices." And when the sins are atoned, this is like the clouds being annihilated and going away, like (there 44): " I have blotted out, as a thick cloud, your transgressions, and, as a cloud, your sins" etc.; and then it is like the shining forth of the sun, from which is the healing, for the main source of illness is the aspect of sin, which is like cloud and darkness, which darkens the light of the sun, which is like healing; and when the sin is forgiven, it is like the clouding being annihilated, and then the sun shines, and then comes healing as mentioned above, and all this comes through prayer, which atones sins as mentioned above.
And the main way of prayer, through which sin is forgiven and we are saved from the sickness, comes via adding a neighbor [Shakhen] from Israel, for whenever a neighbor is added from Israel, the prayer greatens and grows very much. And this is the aspect of congregation of Israel. For the more the souls of Israel are congregated and increased together, the house of prayer increases much much more, for three stones build six (i.e. 3 x 2 x 1 permutations of) "houses," and four stones build twenty four houses, five stones build 120 houses etc., until the mouth cannot speak and the heart cannot think, as is brought in Sefer Yetzirah. Hence, the more one stone is added, the houses are multiplied very very much more, multiple multiple times as mentioned above. And the souls are like stones, like (Lam 4): Let the holy stones be poured out etc., and the houses are like “For my house shall be called a house of prayer.” Hence the more one soul is add and increased to the congregation of Israel, the house of prayer grows much more, for now, when one more soul gets added to the congregation, very many more other new permutations, double double and many many times over as mentioned above, and therefore when one neighbor is added from Israel, for example in a place Israelites live, when another Israelite neighbor is added, then the prayer is increased and grown very very much, for one soul was added to the congregation as mentioned above, and through increase of the prayer, through this the sin is forgiven, which is the aspect of healing as mentioned above.
And this is aspect of (Isa. 33) “And the inhabitant shall not say, I am sick;” for via a neighbor being added, through this we are saved from the sickness as mentioned above, for: “the people that dwell therein shall be forgiven their iniquity,” for through the neighbor the prayer was increased, and then it is the aspect of forgiveness of sin as mentioned above, and through this comes healing, and the sickness is annulled as mentioned above.
[And know, that sometimes it is the aspect of lifting of sins through the congregation as mentioned above, and sometimes it is, God forbid, the aspect of (there 53): "Surely he has borne our sicknesses;” for when the congregants are not meritorious, then they do not merit to the aspect of lifting of sins, and then the Tzaddiq is forced to accept upon himself afflictions for the sake of Israel, and only the world gets saved from sickness, but not the Tzaddiq, God forbid, for he accepts afflictions for Israel, like: "Surely our sicknesses" etc.; but when they merit and their prayer is fit, then it is like: "The people that dwell therein shall be forgiven their iniquity" [Isa. 33], and then also the Tzaddiq is saved from illness, like: "And the inhabitant shall not say, I am sick: the people that dwell therein shall be forgiven their iniquity," as mentioned above.]