With the same material, they should have the same compression strength. However, the difference in geometry gives different stiffness values leading to difference in performance while carrying axial loads.
Capacity will vary. If the cross sectional area of the rectangular and circular columns are same then the axial load carrying capacity will be same. But bending capacity not the same. it may change.