Distinguish profile user and admin user IDs / get ID of user being edited

On the “profile page”, i.e. user-edit.php in the admin back-end, the user ID of the profile currently being edited lives in the $user_id global.

Hence:

global $user_id;
update_user_meta( $user_id, 'key', 'value' );

is the essence of what you are looking for.

Whether the current user is an admin needs to be checked only if you have the edit_users capability assigned to roles other than admins, which by default is not the case.

If you want the admins to only be able to save the metadata for subscribers, while having users of other roles, then you will have to check the edited users role before saving, obviously.

So, for the sake of completeness, the same with both checks in place:

global $current_user, $user_id;

/* user object of user being edited */
$edited_user = new WP_User( $user_id );

/* verify both users roles */
if (
    in_array( 'administrator', $current_user->roles ) &&
    in_array( 'subscriber', $edited_user->roles )
) {
    update_user_meta( $edited_user->ID, 'key', 'value' );
}