The effects on temperature of the shingles has proved to pretty
marginal, especially on a roof with decent pitch, since most of the
cooling of the shingles is from exterior convection currents, not
cooling through the ~ R1 of roof deck& roofing felt into a hot
ventilated attic. The color of the shingle (& roof pitch when you
get down to near-flat 2:12) has a bigger effect than
insulate/uninsulated roof deck.
The true value of vented roof assemblies is the ability to purge moisture (not heat) from the attic. But the effect of unvented insulated-roof attics on the moisture content
of the roof decks will vary based on climate & insulation type- what's "right" for unvented cathedral ceilings will vary by climate zone. Read this
recent simulation project on this subject by Building Science. While not perfect, it's way better than a WAG. It looks like 2-4" of closed cell foam in combination with spray fiberglass or cellulose would work in most of the lower-48. In much of the US dense-packed cellulose or high-density spray fiberglass by itself may be the best bang/buck. Cellulose has a higher thermal mass, is R-value stable over a wide temperature range, and may hold the performance edge in some situations (like places with many hours of 100F+ in summer or sub-20F in winter), but the noo-skool higher-density spray fiberglass (eg JM Spider) gives you a somewhat higher steady-state R-value at moderate temperatures, and may be a better overall performer in moderate maritime climates.
If you think you've put the wrong type of foam in your attic for your climate, moderate vapor retarders like vapor-retardent latex may lower your risk. When you re-roof, putting down 1.3-3" (R10-R20) of panelized iso with factory-applied nailer deck above the structural roof deck will further protect & insulate the structural roof from condensation related issues. Ecofoam comes in closed & open-cell varieties, and their vapor transmission properties are quite different despite both being excellent air-barriers. According to BSC simulation you can get away with 2-4" of closed cell almost anywhere (but it's hard to detect leaking roofs until it's too late"), but open cell alone can be an issue in colder/wetter places unless you have good air & vapor control on other layers.