How to transfer all posts, pages and media

That would involve looping through all posts of all types and then delete the extra fields per post. You could run the following code once in your new theme:

$args = array ('post_type' => 'any', 'posts_per_page'=>-1)

$query = new WP_Query ($args);

if ( $query->have_posts() ) {
    while ( $query->have_posts() ) {
        $the_query->the_post();
        // delete unwanted fields of $post
    }

The delete action depends on what the old theme is generating, but will typically involve calls to delete_post_meta.

Don’t do any mass deleting without backing up first.