The definitions and usages of "glare" and "lens flare" vary in the optic literature, and are applied (often simultaneously) to different things.
However I'm using it to mean stray or spreading light around a visually small light source. This is generally described/modelled/measured in the literature using a "glare spread function" (also "point spread function") - which, quite simply, is a function that tells you how much radiation spreads around any given point in an optical system. This is discussed at:
https://www.metabunk.org/threads/the-shape-and-size-of-glare-around-bright-lights.10596/
Example:
The glare spread function is often described as a one dimensional function (It's also often show with a logarithmic scale, as the center is thousands, sometimes millions, or times brighter than the transparent fall-off), but as you can see from the glare shape above, it's a more complex 2d function, here's a real-world measurement from
https://graphics.stanford.edu/papers/glare_removal/glare_removal.pdf
(Note streaks/rays of light, and the secondary reflection, a lense flare)
Very large "spikes" or "streaks" are most commonly seen with a lens (or window, or mirror) that has been incorrectly cleaned and has physical microscopic streaks in one direction. Wipe your phone camera with a finger (slightly greasy, touch your nose) to see the effect.
Smaller spikes come from the optical system of the camera. They are diffraction artifacts, and can show the shape of the aperture, or other edges and corners in the optical path that result in diffraction. My small Countor-HD camera has an oval-shaped glare even with clear front glass.
A "shaped glare" can come from a combination of things.