Craft’s search system indexes and matches against normalized keywords, not exact text. HTML in particular has all its special characters stripped out, so something like <span class="busted>markup</span> would end up being indexed as span class busted markup span! Your search query is also normalized, though, so a query for <span should match at least the span keyword…
If you know which fields contain the bad code, you can use the condition builder to query against actual field data. Alternatively, building the query in a template will give you precise control over the input:
{% set badEntries = craft.entries()
.myFieldWithPotentiallyMalformedHtml('*<span*')
.all() %}
This will return an entry that has <span class="busted>markup</span> in it.
Keep in mind that this is only doing simple string matching in the database—if you need to scan for in/valid HTML or specific HTML attributes, you may need to perform more advanced matching with PHP… perhaps by loading all potentially-affected entries, then scanning the field values with regular expressions, HTMLPurifier, or other techniques!