let's say exponential
That was an example, which for sure needs more careful consideration. However, linear is not realistic. Bridges scale linearly in length when their main span is constant, which is the case for viaducts but not for bridges over rivers or valleys.
If you want to scale in length and pillars get longer, you will start increasing the bridge span in between pillars because these become expensive. However, you can't increase the span withouth strengthening that section. That will lead to non linear cost scale. Additionally about pillars, you obviously can't use the same pillar strength for a 100m high bridge that you would use for a 5m high bridge, thus not even pillars will scale linearly with height.
So, maybe it is not exponential scaling, which was just an example as mentioned, but it is for sure not linear and definitely not constant, which is currently simmulated in simutrans-ex.
Currently, a 9 tile long bridge across a deep valley will cost exactly the same as a 9 tile long bridge a half-height above ground and if you want to build it one tile longer it will suddenly be simply impossible.
Both of this is far from realistic.
Also, I don't want to bridge from Europe to America, which is a very extreme example, but let's say I want to bridge the Great Belt or from Awaji to Kōbe.
Alternatively in Simutrans terms: I don't want to build a bridge from one edge of the map to the other, but when I have a fairly small part of sea in between two contients and demand in between these is high enough, I simply want to build a fairly expensive bridge that is a few tiles longer than the current fixed maximum.
The issue about tunnels is roughly the same, for sure with different parameters.
We don't have to span across anything and we don't have to build pillars, but we have air conditioning and we need a security concept, thus long spans of tunnel in between emergency exits and air conditioning stations will reqire additional underground infrastructure as emergency and air conditioning tunnels, simmulated as increasing per kilometer costs.
These special constructions required for air conditioning and emergency exits should for sure be more expensive, the deeper the tunnel is under ground, and it should not be possible to place these under water at all.
I am not even sure if the player should place these manually at all or if it should simply be simmulated as increased cost.