Update: After letting the bike sit overnight, I opened the petcock again this morning and the carbs overflowed again, but this time tapping on them (with a hammer and screwdriver handle) stopped the overflow. So perhaps the floats loosened up after sitting in gas overnight? I'm assuming the problem was that they were stuck in the down position, but maybe it was something else.
I also noticed that the petcock itself was leaking around the bowl gasket. Maybe it was dry for long enough when the tank was being repainted that the gasket (which is probably old) degraded somewhat. I tightened the bolt and that seemed to fix it.
In any case, I was able to go for a ride with no overflow. I stopped for an hour, and then when I opened the petcock, carb #1 started overflowing again. So obviously there is some crud in there. I was able to free it up by tapping on the carb body again, but that's not exactly a permanent solution. But hey, neat trick: just hammer away at your carbs when they're stuck. I guess that's why I bought a vintage bike! I'm working up the nerve to pull my carbs for the first time and see if I can clean them out. In the meantime, would it at least help to remove the float bowl and manually push the float up and down to try to free it up a bit? Honestly I haven't yet seen the inside of a carb, so I'm not sure what I'll find.