Ping time when there are no network issues is mostly a measure of distance. The light takes time to pass through the fiber.
When it is just some servers affected it is likely some network problem in the path between you and the server. You would have to dig around and see if you can find news of some network issue. A couple years back major fibers were cut by a ship anchor near egypt and a lot of servers were down or running on much slower backup connections. Took them almost 6 months to get that fixed. It can be many things sometime it is the governments, some countries (china for example) place firewalls between their network and the internet. This can greatly slow things down at times.
Bottom line is you can do nothing directly about a problem that outside your house. Only option would be to get a different ISP that maybe has a different path. Some VPN services may also have a different path. It all depends on what the issue actually is and that information tends to not be easy to find.