By looking into the C++ code of RigidBody2D, I found this:
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_BOUNCE, physics_material_override->computed_bounce());
This translated to gdscript is
Physics2DServer.body_set_param(get_rid(), Physics2DServer.BODY_PARAM_BOUNCE, bounce)
Tested and it works for all types of PhysicsBody2D. Now I can have a KinematicBody2D that has custom bounce or friction (and many other physics properties that seem to be exclusive to RigidBody).