Well we know for a certainty that it was misplaced.
When Ron and Harry surface with Gabrielle we have this:
'Harry, you prat,' said Ron, 'you didn't take that song thing seriously, did you? Dumbledore wouldn't have let any of us drown!'
'But the song said -'
'Only to make sure you got back inside the time limit!' said Ron. 'I hope you didn't waste time down there acting the hero!'
Harry Potter and the Goblet of Fire - pp.436-7 - Bloomsbury - Chapter 26, The Second Task
Later this is categorically confirmed:
At first, he gave what seemed to be the truth; it tallied with Hermione's story, anyway - Dumbledore had put all the hostages into a bewitched sleep in Professor McGonagall's office, first assuring them that they would be quite safe, and would awake when they were back above the water.
Harry Potter and the Goblet of Fire - p.442 - Bloomsbury - Chapter 27, Padfoot Returns
And, in actual fact, the time limit was exceeded and Gabrielle was still under water:
'Mr Harry Potter used Gillyweed to great effect,' Bagman continued. 'He returned last, and well outside the time limit of an hour. However, the Merchiftainess informs us that Mr Potter was first to reach the hostages, and that the delay in his return was due to his determination to return all hostages to safety, not merely his own.'
Harry Potter and the Goblet of Fire - p.440 - Bloomsbury - Chapter 26, The Second Task
So why did he do it?
Harry actually does feel quite embarrassed about this. But it is understandable.
Harry felt both stupid and annoyed. It was all very well for Ron; he'd been asleep, he hadn't felt how eerie it was down in the lake, surrounded by spear-carrying merpeople who'd looked more than capable of murder.
Harry Potter and the Goblet of Fire - p.437 - Bloomsbury - Chapter 26, The Second Task
Another reason is, of course, hinted at by Hermione in another context:
'You ... this isn't a criticism, Harry! But you do ... sort of ... I mean - don't you think you've got a bit of a - a - saving-people thing?' she said.
He glared at her.
'And what's that supposed to mean, a "saving-people thing"?'
'Well ... you ...' she looked more apprehensive than ever. 'I mean ... last year, for instance ... in the lake ... during the Tournament ... you shouldn't have ... I mean, you didn't need to save that little Delacour girl ... you got a bit ... carried away ...'
Harry Potter and the Order of the Phoenix - p.646 - Bloomsbury - Chapter 32, Out of the Fire
We actually return to this episode a few times in the series, as we've just seen. Another example is:
''Arry, you saved my sister's life, I do not forget.'
This was not, strictly speaking, true, but Harry decided against reminding her that Gabrielle had never been in real danger.
Harry Potter and the Deathly Hallows - p.412 - Bloomsbury - Chapter 25, Shell Cottage