How do I add a class to all sidebars to let a Google Custom Search Engine know not to index the content?

If you want to add a class before each widget you should use the dynamic_sidebar_params filter. Another post explains this well. Here’s the gist of it.

function uft_add_nocontent_class($params) {
    $params[0]['before_widget'] = '<aside id="%1$s" class="widget %2$s nocontent">';
    return $params;
}
add_filter('dynamic_sidebar_params', 'uft_add_nocontent_class');

Otherwise, go and edit your child theme files. If you don’t have a lot of sidebars that’s probably the easiest. You could also use some JavaScript to add the class to your selected sidebars.