Draw your Rectangle, press the U key twice to reveal all modified properties of the Rectangle. Spin the Transform/Rectangle 1 properties and adjust the Y value to offset the Rectangle. Now select contents and add the Repeater, and set the proper values. If the Rectangle 1/position or the Transform/Rectangle 1 position is not at the default value of 0, 0, you need to reset it. This screenshot shows all the modified properties of the comp so that you can duplicate it perfectly.

When you get what you need, you can add a new Group, put the Rectangle and the Repeater in the group, then move the created shape anywhere you want with the Transform Group properties.
The rectangles are all still perfectly square. At some sizes and resolutions, you may experience an optical illusion that they are not perfect rectangles.