You can't escape that 5 inch shells are cheap relatively speaking when compared to missiles. A 5 inch gun and a couple of 30mm weapon stations with attached LMM / HVM or maybe even Sea Spear (the Brimstone one, not the actual SPEAR 3 derivative) would seem like the best compromise.
My thinking was that 5" also gives you much less, ie its a shore bombardment gun only.
30mm is really a close small boats only gun (unless it can be used a CIWS what's its anti aircraft or missile targeting like?)
So you realistically need CAMM to survive any realistic air attack, if you cant close to a hostile shore to use the 5" due to SSM risk what does it give you? At least the CAMM/30mm only ship can act as an extra escort and heliport?