Sealing the vapor barrier
You'll want to seal the vapor barrier to the fan housing using an acoustic sealant like OSI® SC-170™, or similar product (you might have to do this from above). Just make sure the sealant is approved for use with vapor barrier, some sealants won't adhere well to the vapor barrier.
If there is enough plastic to lap up the side of the housing about an inch, this will be a simple task. Fold the plastic back away from the housing, apply a bead of sealant around the housing, then push the plastic into the sealant.
If there isn't enough plastic to attach to the fan, you'll have to make a gasket. Simply cut a square of plastic larger than the fan housing, then make a cutout that will fit the fan. Leave the excess from your cutout attached, so you can attach the plastic to the housing. Use housewrap tape to attach the gasket to the existing vapor barrier, then follow the steps above to seal the plastic to the fan housing.
Patching the drywall
Depending on the size of the gap surrounding the fan, you'll have to use different approaches to fill it.
Very small gap
If the gap is really small; as in the drywall basically touches the sides of the fan housing, you're done. Just put the fans face trim on, and enjoy. If you really want to, you could run a bead of silicone caulk around the housing.
Small gap
If the gap is ~1" or less, you should be able to easily fill it with joint compound. It might take a few coats to fill the gap, since you don't want to put it on really thick or it will take a long time to dry. Once the gap is filled, feather the compound out to blend with the surrounding wall. You can use a 10"-12" taping knife for this.
Medium gap
Once you have a gap ~1"-2", it's time to start thinking about making the hole larger and patching it with another piece of drywall. You might be able to fill the gap with joint compound, but it will be much more difficult than with smaller gaps.
Large gap
If the gap is larger than 2", you're going to have to make the hole bigger before you can make it smaller. Cut out a square of drywall around the fan, until you get to the center of a joist on each side of the fan. Cut a new piece of drywall to fit the hole you just made, then cut out a hole in this piece to fit your fan housing. Make sure the hole for the fan is very close to the outside dimensions of the fan housing, so you'll end up with a very small gap. Tape and mud the joints, prime, and paint. Finally, follow the steps above from the "Very Small Gap" section.
Best Answer
While I agree with Isherwood, I don't mind adding solidity. The Take-Off you found might be the best option, since you can cut the pipe to your specific roof pitch and there's much more flange than you need to seal everything.
Though, the Take-Off might be a bit overkill and overthinking. I'd actually just go with pieces of plywood, plank or wood scraps over just the corners...bigger corners.
Those, would be screwed through their sides from the pipe or conversely into the pipe, before the pipe gets permanently to the roof deck. Then, you would just send a proper length screw (doesn't poke into the roofing) through the bigger corners to mount the pipe to the underside of the roof decking.
Otherwise, there are other options that build the roof pitch into them and can be used under the roof instead of on top. First, is an Aluminum Base Rain Diverter Roof Transition Flashing (see- https://www.homedepot.com/p/Oatey-10-75-in-x-1-20-ft-No-Caulk-Aluminum-Base-Rain-Diverter-Roof-Transition-Flashing-12976/100129673 ), which is perfect for your situation. You'd remove the rubber on a diverter that fits your pipe, so you can screw them together.
Second, would be an Adjustable B-Vent Roof Jack (see- https://www.homedepot.com/p/Speedi-Products-8-in-Galvanized-Adjustable-B-Vent-Roof-Jack-BV-ARJ-08/202907043 ) and you would cut it down to just enough for pipe attachment.
Third and last, would be traditional Roof Flashing with Tapered Stack (see- https://www.homedepot.com/p/7-in-Roof-Flashing-with-Tapered-Stack-RFTS7/100112236 ) and you'd also cut this down and probably have to find it at a building supply store as HD doesn't offer over 7-inches...as far as I found.