If rail infrastructure use is to be maximized to increase speed, It only makes sense the sea journey is kept to a minimum. To counter this plan, linking Gwadar and the UAE and then building out the Iraqi and Syrian rail networks to link up with Turkey and Europe will bypass Iran.
China is already helping to rebuild Iraqi rail infrastructure and building a rail line in the balkans.
The real issue here is not Indian trade to Europe, but specifically the potential of ASEAN trade to Europe once Myanmar allows trains between ASEAN countries and India. If China can convince the Myanmar government to block a rail route to India, and at the same time build a rail route across Tibet and down into Pakistan, China will have linked Gwadar with ASEAN by rail, giving China control of the only rail route between ASEAN and the World, and India’s corridor to a Asia will be just Indian trade to Europe, which would undermine Indian plans, in that regard, for greater economic heft in global affairs.