Global wheat prices have soared to multiyear highs as a heat wave sweeping across Europe and Asia slashes forecasts for this year’s harvest.

The price rise could potentially provide some relief to North American farmers, who have largely avoided such scorching weather, just as Chinese tariffs sap demand for other crops like soybeans.

Chicago...