First select the first clip in the edited film that you want to adjust (ignore the fact I've selected the last clip in my example. I loaded it just to reply to your question) and then go to > effects / View Animation / Section / and select the ratio you want by clicking the bar that says 'Like movie' and select the desired ratio. If working in 16:9 then changing it to 3:2 landscape will give you the bars to the sides as in your example. For bars to the top and bottom only Use the 'Free Proportions' in the drop-down list and then hold down the height adjuster arrow on the down triangle until you get the desired height you want.
Then you can right click on the video clip you have altered and select' Copy Effects' which will bring up a dialogue box and make sure only the the box with 'Section' in it is ticked. Press continue. and give the effect a name such as horizontal bars and save. Then you can select the next clip and right click it and select 'Apply effects to all' and the effect should be transferred to all the remaining clips.
There are other ways to do this but this way you have saved a preset you can use in future productions that will always have the same proportions and any text can be layered over the top and bottom bars, but you may have to untick the 'Only apply visible TV area' to get the text to sit within those areas .
An alternative method to that by @CubeAce, is to use coloured images as a background to the text as shown below, using the Size/Position effect to resize the coloured image and position it at the top, bottom or both ( for both you need the image again on a lower track above the text track(s)), and position the text(s) as required.
If you want to fade in/out the text and its background add the fade in/outs as shown below.
Note: the opacity of the second background image, control is circled in the image below, has been reduced to give a more transparent background to the text - this is useful for when you do not want to lose the bottom section of the video/image
Example 1 - full black, bottom of video/image is lost
Example 2 - reduced opacity video/image is seen through the less opaque black.
That is taken from a screenshot and not while rendering from a video editor. I can't think of a way to get the graphics to go across the players' settings as it has across the volume control in your example above unless you are taking a recording of you working while you are editing. The background, (bar colour) is selected from the main program's settings in the top bar. Start at : Effects / Video Object Effects / Background design / Use Colour; and select a colour from the pallet. Then, if needed, click 'apply to all' rather than 'Apply'.
[Edit]
Sorry for out of sequence and late reply. John beat me as we had a home emergency which forced me away from my screen for a while. There are lots of variations within any program as John has pointed out and many different outcomes are possible depending on requirements. This method can be saved as a template with a custom name if need be.
[Additional Edit]
It has just occured to me that if you don't want to lose any of the picture ratio then adapt my first post to include 'Keep aspect ratio' in the ticked boxes when making your selection but it will add side bars as in your examples.