You should either escape the \ character or use a r'' raw string:
>>> re.sub('handle(.*?)', r'<verse osisID="lol">\1</verse>', 'handle a bunch of random text here.')
'<verse osisID="lol"></verse> a bunch of random text here.'
Without the r'' raw string literal, backslashes are interpreted as escape codes. You can double the backslash as well:
>>> '\1'
'\x01'
>>> '\\1'
'\\1'
>>> r'\1'
'\\1'
>>> print r'\1'
\1
Note that you replace just the word handle there, the .*? pattern matches 0 characters at minimum. Remove the question mark and it'll match your expected output:
>>> re.sub('handle(.*)', r'<verse osisID="lol">\1</verse>', 'handle a bunch of random text here.')
'<verse osisID="lol"> a bunch of random text here.</verse>'