This is how you get the CURRENT name:
var activeComp = app.project.activeItem;
var myShapeLayer = activeComp.selectedLayers[0];
alert(myShapeLayer.property("Contents").property(1).name);
I’m not aware of a way to get the original name of the property besides seeing what kind of path it contains. In other words, since the path inside is named “Rectangle Path 1”, it must be a Rectangle group.
You can check the “matchName” for that property group, but that’s not very helpful since it’s always “ADBE Vector Group” for that property group, regardless of what it was named.