I have a .shp file of the world oceans (hydropolys.shp) and create a map with it in QGIS, so the background of the image is the land. Does anyone have any suggestions on how I can overlay my raster output on top of the oceans, but not overlain on the land? So I essentially want my image overlain on top of the uploaded .shp file but underneath the background.
You can't put the map canvas background in front of a map layers. What you can do, is create a land layer and put it in front of the raster image.
Since you already have oceans, you don't even need new data.
Duplicate the ocean layer: right click on the layer name 'hydropolys', choose "duplicate layer" from the menu.
Now you have a new layer called 'hydropolys copy'.
Style 'hydropolys copy' with an inverted polygon fill. This will shade in all of the area outside the oceans, IE the land. Match the fill color to the color of your map canvas background.
Arrange the layers in the Layers panel in this order: