I'd say it also depends on the relative speed at which the square peg is moving in relation to the round hole. If we are talking about opposing near earth orbits, neither the shape of the peg nor the shape of the hole will have any significant role in the ultimate end result. An impact at roughly 16 kilometers (10 miles) per second tends to reform the shape of the participating objects anyway. It also tends to turn parts of the objects to plasma and the rest to hypervelocity bullets, so there are downsides, too.
But all in all, at these kinds of speeds, for a fraction of a nanosecond, the square peg and the round hole will be a perfect fit, no problem. It's only what happens next that will make you want to be not the engineer responsible for the experiment.
"For me, programming in Perl is like my cooking. The result may not always taste nice, but it's quick, painless and it get's food on the table."