This is not so different than the method used for Quad trees.
For each shape, you should be able to compute :
its centroid.
its envelope.
When computing the median, use the centroids. The envelope of a shape should fit in the quad. When inserting a shape in a quad, check if its envelope crosses the hyperplane. If true, store the shape in the quad. If false, put this shape in the appropriate list of shapes of your left or right quad construction call.
Cheers