India already hosted refugees that resulted in Pakistan and Bangladesh
They converted to Islam.
If not, where did they come from?
Invading soldiers came here. They didnt migrate.
Mostly invaders were Turk, Afghan, Persian, etc.
Can you see Turks in Pakistan and Bangladesh?
Afghans still identify as Afghani or Pashtoon and they have their province near Afghanistan. Pakistani Pashtoons and Afghani still have open border (to some extent).
The fact is, India was not united before 1947.
No single ruler, ruled the entire territory which India have currently. They were referred as Indians by the foreign traders, because of the Indus river.
Here is a list of Hindu rulers and the specific areas they controlled in India;
https://www.sansarlochan.in/en/list-of-hindu-rulers-indian-history-important-dynasties/