How can I make a finished attic cooler and all bedrooms comfortable when central A/C is shared between 2nd and 3rd floors?
In summer the attic is heated by the sun through the roof and windows and also by warm air rising from the rest of the house through the staircase.  Closing the attic door would reduce the amount of warm air rising, but that is not the main source of heat.  The sun is.  And closing the door also decreases the flow of air from the attic registers back to the return on the second floor.  The gap below the attic door is just not enough to conduct an entire floor's airflow back to the return.
These were the problems:

The system was very poorly balanced.  The second floor bedrooms got most of the air flow and the attic got very little.
The attic had no return vent which was a big problem made even bigger when the attic door was closed.
The thermostat was in The Annointed Place in the upstairs hallway near the return vent but that turns out to be the worst place for my house.
My upstairs A/C was a little oversized for the total amount of airflow it had.

These were the steps I took:

I added a return duct in the attic hallway.  A small one, 10 inches.  I think this was the essential element.  It mixes warm attic hallway air with the cooler return air from the 2nd floor return, and thus balances the whole system.   It massively increases flow THROUGH the attic when the attic door is closed.  With the air mixing from the two returns the thermostat now gives love to the entire two-floor zone.
I added a second register in each of the two attic bedrooms.  It was easy to do by snaking ducts through the unfinished attic crawlspaces.  This gave the bedrooms a  greater share of the attic's air flow, a slightly greater share of the overall system airflow, and also brought the total air handler's air flow closer to its ideal, given it was a bit oversized to begin with.
I moved the thermostat from the 2nd floor hallway to the master bedroom.  This sent all the professionals involved into wild conniptions, and they made me sign a notarized release before they would work on it. Not really that.  But they all follow a universal rule of thumb that the thermostat should be in the hallway outside the bedrooms near the return.  In my house, with the bedroom doors closed and the downstairs system shut down during the night, and the open staircase, the upstairs hallway was where all the warm air collected.  So the bedrooms were always 3 to 8 degrees below the set point.  And the result of that was that the thermostat was never satisfied and the 2nd floor bedrooms were cold and clammy.  So I forced the electrician to move the thermostat into the master bedroom.  Because of all the attention I had paid to creating balanced air flow, this worked like a charm.

So far so good.  Within 5 minutes of the system starting up, all the rooms on both upper floors were in balance and when the thermostat became satisfied all the rooms were at the set point.  This worked with the attic door open or closed.  Once the system shut down the attic rooms would then heat up much faster than the second floor so by the time the thermostat called once more for cooling, the upstairs was about 10 degrees too warm.  So .....

I upgraded my thermostat from a $20 one to a $40 one, slightly smarter (but not a &quot;Smart&quot; one) that has a setting which, while the system is down, wakes up the fan for 5 minutes every so often.  This worked really well.   The setting was hidden deep in some secret menus available only in the &quot;installers&quot; manual that did not come with the stat.  But all the 2nd and 3rd floor rooms stayed in balance at all times and always within a few degrees of the thermostat set point.

Notes
This was not a DIY project for me.  The ductwork changes took a pair of professional installers an entire day.  Because I had a finished attic the job to move the thermostat from one interior 2nd floor wall to another one was a bear of a project for an experienced electrician with a helper.
It was easy for me to install the attic return because the upstairs air handler is in the unfinished attic space behind the wall of the hallway.  They just had to poke a hole in the wall and add a short duct that joined the main return in the plenum outside the handler.  If the handler were in the basement it would have been a MUCH bigger project.