The Tube stock, although the only stock that used to fit, left quite a lot of spare headroom. There is a photo somewhere of a class 485 with gauging templates to test whether a Wirral Line 503 would have fitted.
I also recall reading that the clearances in the tunnel (actually a covered way) have improved because the supports for the road above have been replaced and are now of shallower depth, which is why D stock will now fit.
There were two limiting factors with Ryde tunnel - one was some concrete beams installed in the late 60s to support the road above - these caused a height restriction but apparently have now been removed.
The other is the tunnel has a 'reverse curve' in it which limits the length of the stock which will fit through it.
Here's a comparison between the 483, D78 (484) and 507 - picking the latter because the Merseyrail system also has some clearance restrictions through its tunnels
Class 483 length 16m, width 2.6m, height 2.9m (rounded up the odd cm).
D78 length 18.4m, width 2.85m, height 3.62m
507 length 19.8m, width 2.82m, height 3.6m
I guess that the additional length of about 1.5m per car is the reason why something like a 507 won't fit down there and the decision has been to go with the D trains. The reason why the old Merseyrail 503s would have been considered though is their car length was 17.6m - so shorter and therefore more likely to have fitted.