The internal thread will be M5 x 0.8 if it's a Campagnolo-style shifter boss, as it appears to be (with flats on the "dowel" part). I would use a tap (bottoming type if available, as aforementioned) rather than just a screw to clear the threads.
And, before removing all the paint around the outside of the square boss, I would check the fit of whatever shifter part is going to mate with it; in my experience they can vary a bit in terms of the optimum fit, and you don't want those to be too loose.
Last edited by Charles Wahl; 01-04-25 at 09:09 PM.