Placing a sub that wasn't designed to be put into another enclosure is a mixed bag and yes it will affect performance as well as potentially not allow for cooling of the amp if that isn't also accounted for. I'd likely opt for a sealed sub, which narrows your choices a bit, but one of the front ported choices might work so that the port and the driver are facing the opening, but in most cases that means setting it on its side and having the amp facing down which would be bad for cooling. So while I think it could be made to work, it might not yield the best results. A passive sub with an external amp that could be mounted separate from the enclosure might work as well. I believe NHT and a couple of other manufacturers make "in wall" subs for this exact use as well.
You might just consider looking into building an infinite baffle sub that works in that space as it will have less issues than dropping a sub into that location and likely be easier. You'd basically be fabricating the enclosure below and dropping a driver in (one designed for infinite baffle use) with a separate amp. If you can fit one of those subs in there, then you have enough room to do one of these.