The equations point the way
The question states two use cases, projectiles in a vacuum and projectiles in an atmosphere. As the shape of a projectile in a vacuum is simple, ie. whatever shape fits the barrel, the rest of the answer will concern itself with the more complicated atmospheric case.
The drag equation will have a lot to do with the shape of the projectile. It is..
$$D = Cd \cdot \frac{\rho \cdot V^2}{2} \cdot A$$
where $D$ is drag, $Cd$ is the drag coeffiient, $\rho$ is the density of the air, $V$ is velocity, and $A$ is the area.
Also, the kinetic energy equation will mean a lot too. It is...
$$E_k = \frac{1}{2} mv^2$$
...where $E_k$ is the energy of the object, $m$ is mass and $v$ is velocity. Remember kids, it's kinetic energy that kills.
Natural Shapes for Projectiles
From these equations we can see that we want to get our projectile's velocity and mass as high as possible, while also keeping the frontal area and drag as low as possible. Both deorbiting objects and railgun projectiles provide spectacular initial velocity to work with. Hooray!
Let's go step by step then...
- A plate has a huge frontal area so we want something more narrow.
- A sphere has the least surface area to most volume of any geometric shape. However, spheres aren't especially aerodynamic and are notoriously difficult to aim.
- We observe that the longer an object is, the more likely it is to self-correct its trajectory. We want to hit what we aim for. (Aerodynamics, of course, play no part in space battles but we don't want to carry more ammo types than we have to.)
- A rod is long, so it's easier to aim, plus it has minimal frontal area which keeps the value of $A$ low. Rods also provide lots of volume to put all that lovely mass that we need to make our $E_k$ values really terrifying.
What the equations don't say
Hypervelocity projectile noses are not intuitively shaped. While the projectiles are generally rod shaped, the nose of the rod may not be pointy. The front of the projectile shot out of the US Navy's rail gun is blunt. There's a YouTube Channel run by a guy named Taofledermaus who does lots of experimental shotgun loads. So very often, he'll take a slug that looks aerodynamic but just tumbles on the way to the target. It's not easy.
Aerodynamics is also an extremely complicated field. Trans-sonic aerodynamics is notoriously difficult within an already difficult field. Above the speed of sound, air behaves like a solid. Below the speed of sound, it behaves like a fluid. Around the speed of sound, it behaves like something else.
Also, aiming from orbit is really difficult as demonstrated by this WB answer. Without terminal guidance to track and adjust trajectory to hit a smaller target, this hypervelocity projectiles probably won't be accurate enough to be really dangerous. You'll be able to hit static targets without too much trouble but moving targets are too difficult, especially when you have to lead by a few minutes.
Even lead times of 30 seconds or so can be defeated with relative ease. WW2 bomber pilots received extensive training on how to avoid flak. Even a few seconds lead time is enough to make a shot miss, as this AC-130 gunship (WARNING: Graphic)demonstrates. Even changing direction a little bit will make a shot miss by enough to be ineffective. Throw in trying to hit targets in a 3D space, it gets very difficult, very quickly.