Why don't most militaries invest in ballistic missile programs? Countries like Egypt, Turkey, Brazil, Indonesia, etc. Turkey, I know recently started a SRBM program, but why now? Why not 20, 30, 40 years ago?
First off, some assumptions. SRBMs are longer ranged than MLRS. We're looking at a lower end of 300km (eg. ATACMs) to maybe 500km+ (eg. Iskander)
That range is also Cruise Missile territory. The classic tradeoff of Cruise Missile vs SRBM is essentially that of ease of detectability vs difficulty of intercept. Cruise missiles are easier to make terrain hugging and therefore hard to detect but "low and slow" makes it easy to intercept. BMs fly a ballistic trajectory making them easy to detect but their speed makes them hard to intercept. As early as your time line goes ("20, 30, 40 years"), this is the perennial trade off. You could make a really fast cruise missile (eg. Oniks) but then they are harder to make and much more expensive and therefore out of reach of these 2nd tier militaries you mentioned.
All this time, LACM and SRBMs are primarily for fixed targets. The further back in time you go, the more fixed the target had to be. Accurate land survey and accurate INS to ensure your missiles hit where you want them to. Uploading targetting data into the missiles ... all these took time. Somewhere between then and now, access to GPS-like systems made that easier and cheaper and therefore more within the reach of small-medium MICs (allied to friendly GPS providers).
Another big factor is also that of advances in electronics and miniaturisation has also brought down the cost of the components significantly. The one big change that modern tech has brought though, I believe, is the advent of tech that closes the sensor-shooter loop - which changes the game (and use of SRBMs).
The problem with having a range of 300-500km is that you are likely to be shooting at things about 200-300km infront of your FEBA. ie. 200-300km behind enemy lines. Except for fixed installations, most military organisations will struggle to expand the target list beyond that.
You cannot shoot what you cannot see/find.
The traditional method involved SOF teams ala Bravo Two Zero or low level recce flights - both really really hazardous duty in any high intensity conflict.
However, more nations now have their own ISR satellites. Heck, even Singapore has their own.
More than that, as witnessed by the Ukraine conflict, the ubiquitousness of ISR drones - from HALE to tactical drones means that even more Militaries are now capable of finding target of opportunities deep in the OPFOR rear. The big game changer I believe are the tactical drones like the Orlan-10/30. Big HALE/MALE can be very successful in a benign environment but high-end tactical drones have shown that that they can operate in high density AD environments that ground HALE/MALE assets.
Today, a 15kg drone has the ability to stay on station for 10+ hrs, relay in teams to extend reach to 200-300km away from the drone operator, while carrying onboard an IR/EO ball and a TD to boot.
What this means is that you can find targets, relay the info quickly and easily and if neccesary, lase the target for pin point accuracy even if it moves.
Given a flight over 200km - a LACM at high subsonics = about 15mins time on target, a SRBM = about 1.5mins ... No biggie really IF the target is fixed. But 13.5 minutes (or more) is plenty for a target to displace or disperse (a wheel based system can easily displace 15km in that time) - hence probably the increasing value of SRBMs?
(footnote: A suicide drone, at speeds typical to a drone, would take 80-120 mins to cover that 200km ... an eternity in a fluid battlespace)
So yeah, I'd say we'll see more 2nd tier militaries having a broader mix of options to prosecute targets. From suicide drones (of all sizes) to MLRS to LACM and SRBMs. All together providing a Hi-Lo mix of options for fixed and fleeting targets.