What bitrate is the MCU running at?
If boring say <20MHz SPI then it can be pretty much anywhere on board, just don't make a circuitous route around everything. The higher you go from there, the more critical line length is, and the closer the connector should be. (More to the point, due to edge rate; difference being, faster MCUs have stronger pin drive than slower ones. Often selectable too. Use the lowest (analog) bandwidth for the interface you can.) Resistor position doesn't really matter; any source termination resistors are long past (within the programmer hopefully, or by the MCU and Flash output pins respectively). ...Perhaps that's not as good an assumption as it is a reminder: use source termination resistors *at* the output pins.
As far as minimizing stub length with respect to each driver, putting the resistors in the middle of the MCU-Flash route would be optimal. But, the Flash programmer may not need such resistors at all, and be perfectly comfortable driving such stub length (or more, whether placed near MCU or Flash). Again, so long as you ensure MCU in reset.
Note these aren't clear statements, and not even proportions. Even 100M SPI (usually QSPI at that) isn't so fast that a connector can't be dropped in the middle, or to one side or the other, as long as the two chips in question are nearby. It's pretty non-critical.
Tim