I don't know why custom palettes are open at startup. It may be to do with how ZBrush loads custom menus after loading the main interface.
I found a way that may work for you. You could include it in a startup macro, or have a macro that you operate by a hotkey or press after ZBrush starts. The contents of the macro button should look something like this:
In the above code, 'Sculpting' is the name of the custom palette, then 'Brushes', 'Geometry Options' and 'Symmetry Stuff' are the names of the custom subpalettes. Obviously you will have to change these to suit your set up, and duplicate the [If,[IHeight...] code portion for any further subpalettes you have.
[If,[IHeight,"Sculpting:Geometry Options"]> 25,
[If,[IHeight,"Sculpting:Symmetry Stuff"]> 25,
]//end of macro button
I did find that sometimes the button needs to be pressed more than once to close all the subpalettes. I couldn't find out why, or come up with a reliable solution. Anyhow, perhaps it will help.