You probably want to get the single element, not all of them again when you try to replace the html. So instead of
$(this).html($(".widget_categories li").html().replace(/(\([^)]+\))/, "<span>$1</span>"));
Change to
$(this).html($(this).html().replace(/(\([^)]+\))/, "<span>$1</span>"));
Example (note I escaped the span tag just to make it easier to see the result)
$(function(){
$(".widget_categories li").each(function () {
var newValue = $(this).html().replace(/(\([^)]+\))/, "<span>$1</span>");
$(this).html(newValue);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul class="widget_categories">
<li>foo (x) bar</li>
</ul>