RE: Would India and Afghanistan have had a close relationship had Pakistan not been founded?
Conclusion
One could argue that, based on available historical facts, Afghanistan and India would have had a tense relationship had a united India emerged out of the ashes of the British Raj.
India would have been painted in Afghanistan as a usurper of Pashtun lands. This rhetoric from Afghanistan and India’s response to it would have seriously questioned the basis for any historical relationship arguments.
If anything, Afghanistan and India share conflicting narratives of centuries of invasions and conquests. Afghanistan, however, did have warm relations with India’s Muslims. But a majority of those Muslims today live outside of India, either in Pakistan or in Bangladesh. Those who remain in India are not considered loyal Indians by Hindu extremists anyway, and are subjected to discrimination and harassment from time to time.
The current close state of affairs between India and Afghanistan is mainly due to opposition in both countries to Pakistan—to an extent to the country's existence and to an extent to some of its policies. As soon as the status quo changes in South Asia, we will witness estrangement between Afghanistan and India.