Earlier quoted context omitted.
I guess Kipling's knowledge of this had a practical basis, since he was one of the chief apologists for the systematic extortion the British Empire used to enrich itself.
(Note - I am from one of the countries invaded and occupied by Britain) I must come to Britain's defence here - it's behaviour was normal in those times but it did eventually give up most of its "ownership" without actually being defeated in wars. That was pretty amazing. By modern standards, British behaviour was despicable, but a lot of the invaded countries got enormous benefits - rule of law, economic infrastruct…
As for Britain giving up its ownership: To this date formally England lays claim to a whole bunch of places that they have colonized and in some cases it has gone to war to keep that situation as it is.
That the UK gave up India is a pretty complex affair but you can bet that the 'let's fight' option was only taken off the table when someone did some basic math.
Whether or not the invaded countries got 'enormous benefits' is immaterial, we do not live in the alternate universe where India was not a British colony, in which universe India may have been better off or it may have been worse, we simply can not know.
All we do know is that in this universe we (nowadays) take a dim view of such colonization, including those colonizations in our collective past. That some countries were 'not as bad' as others and that they left the places they invaded (and usually plundered) in some ways in better shape is imo immaterial to that.