For example, would a nephrologist ever refer a patient to another nephrologist, or would this be too embarrassing for the first physician? I'm curious what new/unexperienced specialists in a particular field would do if they're supposed to be the ones most knowledgeable about a certain set of conditions (since they are specialists after all), but don't have the necessary experience to take care of the problem.
Remember, you can subspecialize so sometimes a specialist would refer someone for their subspecialty skills.
For example - a pulmonologist might refer to an interventional pulmonologist, or to another pulmonologist who manages cystic fibrosis, or pulmonary hypertension, or idiopathic interstitial lung disease, or to a transplant pulmonologist
A cardiologist might refer someone to an interventional cardiologist for a cath, or an electrophysiologist for EP studies/ablations/pacemaker, or adult congential cardiologist, or heart failure/transplant cardiologist
An ophthalmologist might refer someone to a neuro-ophthalmologist. An ENT might refer to a trachea-reconstruction specialist, etc.
As for new attendings - if they run into a situation that they don't know what to do - they do what other physicians do when they run into situations that they don't know what to do - they ask their colleagues for advice and suggestions. The bread and butter stuff are pretty straight forward - it is the weird disease, or weird presentation, or common presentation that doesn't make sense - that makes one think and ask for help/advice.
There is no shame or embarrassment in referring patients to the appropriate specialist/subspecialist. The important thing is knowing the limit of your knowledge/skills and referring when appropriate. And you do what's best for the patient.