How should we interpret Proverbs 20:30 which seems to imply that physical discipline can have spiritual advantages?
It is worth remembering that Proverbs is not a book to look to in order to establish doctrine. It is a source of wisdom and of principles to apply in a wide varietly of ways to a wide variety of situations. I do not believe there are any theological implications to Proverbs 20:30. In fact, I have never heard it used to justify the kinds of self-inflicted pain which are practiced by a number of Roman Catholic groups, as it is rather obvious that this proverb is not intended to be used to teach how an already spiritual person can become more spiritual.
Here is how I think about Proverbs 20:30. The proverb writer is saying that discipline can be helpful in driving away foolishness. I assume that the Jews interpreted this as chiefly applying to youth. Discipline by parents or by those in authority, including physical discipline in some cases, will help the young to acquire wisdom and to avoid foolish acts. I will admit that on the face of it the proverbialist seems to be saying that sin is literally atoned for by the beatings, but remember that this is not a theological treatise. It is a wise suggestion. This is the key, in my opinion, to interpreting the passage. These "beatings" cleanse and purge by driving out the inherent foolishness and tendency toward sin of youth.
These are my thoughts.