Modifying Drupal core (search module, image module)
I'm not sure how the second one is Image module-specific, but you would override that maxlength like so:

function hook_form_[content-type]_node_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    $form['title']['#maxlength'] = 500;
}


... where 'hook' is replaced with the name of your custom module, and [content-type] is the machine name of your content type.

The API function is hook_form_FORM_ID_alter()

For the search form theming, you probably want something like template_preprocess_search_results() in your template.php of your custom theme, and/or adding a custom search result template to the theme's templates folder.

Oh, and in case it needs saying again,

DON'T HACK CORE