I've done that before with turned pin sockets - take two and crop any pins you need to intercept on the top one and file flat enough that they wont touch the bottom socket, then solder Kynar wirewrapping wire into the bottom socket, using them as solder cups, and round the base of the shoulder of the pin for connections to the top socket, then take the wires to a daughterboard mounted nearby on 3M VHB foam tape.
If you put solder paste in each individual socket of a 28 pin turned pin DIP socket, you could reflow it SMD style onto the protruding pins of another one, already soldered through your PCB leaving its pins free to plug into the main board. If you need more height, you could reflow it onto the ends of the pins of a wirewrap socket, previously soldered through your PCB. A fillet of epoxy to mechanically reinforce the joint may be a good idea.
However as Blueskull has pointed out, as m-m turned pin headers are readily commercially available, if you can tolerate as little as 0.1" lateral offset, its best to put footprints for the socket and the header, separate, but overlapping.
Hint: if its ever going to be removed, put a sacrificial 28 pin turned pin socket between it and the main board. If any pins get damaged, you've then got the chance to gently pry off the sacrificial socket and press it into a new one.