Yes, he would have been expected to pay those debts, if he won. That money was lent to the Iron Throne - the government of the Seven Kingdoms - and not to Robert Baratheon personally. Since Stannis was claiming that he was the rightful heir to the throne, he was implicitly saying that he would also inherit the debts.
In fact, one of the reasons they agreed to fund Stannis is because Tywin Lannister had been vocal about not honoring Robert's debts, despite also claiming that his sons were the rightful heirs to the throne. So, in the Iron Bank's mind, funding Stannis's attempts to retake the throne was a risky investment, but also the one they felt most likely to get them their money repaid. Davos basically says as much when he's trying to convince them to help out.
(It's not clear how much Twyin really thought he could get away with ignoring the Iron Bank; he tells Olenna that he's not afraid of them, but that would be a rather idiotic position for someone of Tywin's financial acumen to take.)
In the novels, I believe it is made more explicit that the Iron Bank's help is specifically predicated on Stannis repaying the Iron Throne's existing debts. Here, it's Cersei, not Tywin, that decides to stop repaying their loans, which I find infinitely more plausible. It's also made much more clear that the Iron Bank is in the habit of funding the enemies of people who default on their loans, which is essentially what they're doing with Stannis.