'88 and '89 Town Cars had the exact same motor, FWIW.
As long as your E7 heads and valves and such are all in good shape, you should be able to bolt up your H.O. parts onto the 'Stang just fine. Be aware, however, that the lo-po 5.0 motors found in Panther car (Town Car, Crown Victoria, Grand Marquis) and the Fox T-Birds/Cougars don't have the same pistons as the H.O. motors, so your compression ratio will be different. The firing order between the H.O. and non-H.O motors are also different because of the different cams used, and the lo-po motors use a lower-rate injector (I think 14# injectors instead of 19#).
Basically, the only thing you'll really want to use from the Town Car might be the short block assembly, as you'll want to swap over the heads, cam, intake, injectors, and such onto the Town Car motor. When switching the cam, if you do decide to upgrade, or if you're planning to do so later, again be aware of the fact that the lo-po pistons don't have the same valve reliefs, so piston-to-valve clearance might be an issue if you go with too aggressive of a cam, or any other valvetrain mods that would give you more lift than you can safely clear.