Wow okay, so after posting this I almost immediately came up with the solution.
It was a combination of the two things I tried.
$defaultquantityarray = array(
'quantity' => '2'
);
update_post_meta( $post_id, '_default_attributes', $defaultquantityarray);
Apparently WordPress automatically serializes data in some meta_value
s, and I was essentially serializing them twice hence the s:29:
prefix.