Make subtitles using the 2deadfrog subtitles script: http://www.2deadfrog.com/subtitles-in-after-effects/
Then add a black background using the method described in the first 3 minutes of: https://www.youtube.com/watch?v=bD5xw9m-sc4 In short, On the text layer, add effect > Blur > (fast) Box Blur add effect > Generate > Fill. Change color to choice of color add effect > Color Correction > Curves. Set the Channel to alpha, and lift the line in the plot to be horizontal at the top add effect > Channel > CC Composite