I have a design attribute which I want to be hidden as we are not using that attribute anymore but have to keep it here for legacy . Is there any way we can hide/show any design element in .design file?
You can implement the isValid method in your DynamicPickList class to allow the invalid values as well to get around the save validation issue. See https://developer.salesforce.com/docs/atlas.en-us.210.0.apexcode.meta/apexcode/apex_class_VisualEditor_DynamicPickList.htm
I'm afraid there is no mechanism today to remove design attributes once your component has been released. The attribute is part of the API contract of your component, and there will be pages using that. If the component hasn't been released/used anywhere you can remove the attribute, but I believe you first have to remove the implements="flexipage:xyz" interface from the .cmp to get around the validation.