Well. When the United States of the Ionian Islands were created in 1815, they were the only Greek-speaking territory outside Ottoman rule. Once the independent Greek kingdom had come into existence in 1830, though, I think it became a matter not of if but when Ένωσις would take place, and the examples of the Italian Risorgimento, the unification of Wallachia and Moldavia, and the expansion of Serbia add to the impetus.
A couple of things might have slowed this down. First, the immediate political context of the handover in 1862-64 was to stabilise the rule of the new British-backed King of the Hellenes, the young George of Denmark. If King Otho had held on - indeed, if Athens had started pursuing anti-British policies around the Ionian Islands, as it did around Cyprus a century later - helping the Greek kingdom would have been a much less attractive option.
Second, the Suez Canal was opened in 1869 and suddenly the Mediterranean became the key shipping route to India. Of course, the British still held Gibraltar and Malta and had a large influence in Egypt, and picked up Cyprus in 1878; but had the Ionian Islands still been under the Union Jack when the canal opened, they would have suddenly acquired much greater strategic significance. (Especiallu if, since we are in the realms of the counterfactual, the Brits had somehow lost Malta in the meantime.)
However, I think that unless the Greek state had failed catastrophically, or never come into existence, the Ionian Islands would have become part of it sooner or later. While Gibraltarians do not feel Spanish, and the Maltese are neither Arabs nor Italians (and were actually offered full integration with the UK at one point), the Ionians clearly did identify as Greek (as even the hostile Kavanagh bears witness). The gradual disintegration of the Ottoman Empire and expansion of the Greek state (Ionian Islands in the 1860s, Thessaly in 1881, then Crete in 1906, then Macedonia in 1912-13, then the Dodecanese in 1947; with certain setbacks in 1923 and in Cyprus more recently) is a compelling narrative, which fits in also with the growth of the other Balkan states (the future Yugoslavia, Bulgaria and Romania).
Perhaps a reforming Ottoman Empire could have resisted fragmentation, become a credible partner for the other Great Powers in maintaining stability, and created a viable system of internal autonomy for its minorities that did not inevitably lead to independence or merger. In that case one could see a British presence on the Ottomans' Adriatic flank continuing for much longer. It doesn't necessarily get the Ionians Dominion status terribly quickly though; Cyprus had to wait until 1960, Malta to 1964 and Gibraltar is British still.
Of course the process of Risorgimento / Ένωσις does not inevitably lead to that conclusion; there are a number of examples of states whose majority is ethnically similar to their neighbours, but who end up on the other side of the border for historical and geopolitical reasons - most recently Kosovo, but also Moldova and Austria (all three of which were indeed united politically with their ethnic kin during the second world war, after which the winning powers broke them off again); and more locally to this discussion, the case of Cyprus, where a Greek attempt at annexation in 1974 foundered in military defeat.
Sometimes the process can even go into reverse, as happened ultimately with Yugoslavia (and, farther off, Somalia, where a British colony united with its ethnic kin in 1960 but has since had second thoughts). I suppose the last possibility to look at is that the government in Athens might have treated the Ionian Islanders so badly after 1864 that some or all of them would have revolted back into the arms of the British, or possibly the Italians, or like Mayotte opting for an uneasy separatism. There were indeed frictions, but basically there was more willingness to make the deal work than to cause trouble (which is the important difference with the Yugoslav and Somali cases).
Anyway, I'm glad that james_nicoll asked the question, and I hope you are too.