So back in my university days, I was part of a group looking at ways to tackle the Edinburgh city region's inevitable explosion in population (set to double by 2055) and how transport initiatives might tackle that. I'm a long term lurker but I feel there's a couple of things I can contribute to this thread.
Firstly, we looked at the trams and buses routes to the peripheries (Edinburgh is a uniquely hilly city but over the next few decades trams especially will be forming an increasingly vital part of the city's infrastructure, think Granton, Portobello, eventually as far as Dalkeith and out east to eventually Riccarton)
Next, a wholesale remodelling of Waverley is inevitable, with a mezzanine level and a new tunnel bore into the western end. The new bore isn't easy, and high speed rail may change things like balance between the station throats, but a new bore is going to be needed to match commuter growth by about 2040. Stringing wires up across most of central Scotland and Fife, the Dalmeny Chord and potential four tracking as far as Newbridge jn will all help in their own ways
From the east, four tracking as far as Portobello Jn is needed by about 2050, along with three more westen bay platforms at least. The track between Powderhall Branch jn and Portobello Jn was originally four track and slewn over the formation for higher speeds in 73 so this part would be easy. Between the tunnels and Powderhall, the work would involve demolishing a couple of warehouses, land takes and rebuilding the bridge under London road (this would involve extended road closure of an arterial route, but fundamentally would be difficult as there is enough of a up from the east side. The rebuilding will also be needed to support segregated tram tracks if they do end up following roughly the road alignment)
Eventually, the plan is that the four tracking between Dream and Prestonpans will result in a new high speed alignment through open countryside from Portobello-ish as far as Dunbar (maybe further) and eventual service provision would be 2tph to North Berwick, 1tph all stations to Dunbar, and 1tp semi-fast to Berwick. Reopened stations at East Linton, Reston/Grantshouse and new stations at Blindwells (for the new ~6000 homes), Inveresk (for Mussleburgh east) and potentially Portobello (mainly to allow journeys into east Edinburgh from further afield rather than switching at Waverley) would open up journeys along the coast, and take advantage of the paths created by the new high speed alignment. On the Borders line, 3tph as far as gorebridge at least (we didn't look into the Borders line as part of the scope of the survey)
A lot to digest here, but the long term plan is a new generation of commuter towns (think Winchburgh, Blindwells, Shawfair ect) with a new high frequency services is an all together easier way of managing population growth than inner city development in a city already fighting itself over space.
Hope this helps clear some things up about the projected expansion over the coming decades, although I fear I myself at least might not be here to witness most of it as it does seem very far away.