St Anselm didn’t believe in Penal Substitution, so he wouldn’t have said such a thing.
But Calvin did believe in PSub and for sure went that far. In Calvin’s Institutes 2:16:10, Calvin says:
[INDENT]Nothing had been done if Christ had only endured corporeal death. In order to interpose between us and God’s anger, and satisfy his righteous judgment, it was necessary that he should feel the weight of divine vengeance. Whence also it was necessary that he should engage, as it were, at close quarters with the powers of hell and the horrors of eternal death. … … Hence** there is nothing strange in its being said that he descended to hell, seeing he endured the death which is inflicted on the wicked by an angry God. **It is frivolous and ridiculous to object that in this way the order is perverted, it being absurd that an event which preceded burial should be placed after it. But after explaining what Christ endured in the sight of man, the Creed appropriately adds the invisible and incomprehensible judgment which he endured before God, to teach us that not only was the body of Christ given up as the price of redemption, but that there was a greater and more excellent price—that he bore in his soul the tortures of condemned and ruined man.