Wasn't aware that Pius XI said anything along these lines:
Again, this is Puritanism with a Catholic veneer. You can always recognize it by the primary idea: that sex is something bad, something dirty, something to be avoided for its own sake. On the contrary, sex in itself is something GOOD, having been created by a perfect God. He designed it. It is good and beautiful. It is only the devil's warping of marital love into selfish lust, promiscuity, and other degradations (ɧoɱosɛҳųαƖity, etc.) that is evil.