Typically Fantasmic has two showings, so you should definitely make the second one with no issue.
I do not think you could make the first showing, if the first showing is before 9pm.
The HDD show typically is a little less than two hours.
The issue is not so much when HDD ends, it's HOW you are going to get from HDD to Hollywood Studios.
Having your own (rental) car is probably fastest. If not:
If you are willing and able to take a Minnie Van, that is likely to be fastest, they will pick you up pretty much right there.
Otherwise, you could get a Lyft or Uber, but you would have to take the bus to the main part of the campgrounds to get picked up.
Otherwise, you are held hostage to the various bus/boat options, and the luck of the draw as to how long it takes.
Also realize that a bunch of other people will be trying to do the same thing.