Here's the weird output, looks like min and max possible values for the data type?
Here's my inputs, all pixel values should be set to 0.
You set all values to zero and you specify nodata value as zero. So you get an empty raster, all pixels have nodata. Since there is no min and max value in the image to show in the legend, QGIS displays the limits of Float32 type, which is -/+3.40282..×1038
To solve the issue: