Reliable quantitative phase analysis (QPA) of mineral residues---such as bottom ash from waste incineration and metallurgical slags---is essential for resource recovery and process control, yet traditional methods such as Rietveld refinement are labor-intensive and sensitive to user expertise. Deep learning offers a route to automate XRD-based QPA, but prior architectural comparisons of convolutional neural networks (CNNs) and Vision Transformers (ViTs) have treated phase classification and fraction regression as separate stages; a joint multi-task formulation with direct, controlled architectural comparison has not been reported. We train a single multi-task model that simultaneously classifies phase presence and regresses phase fractions on mixed-phase XRD patterns, and compare a 1D-CNN against a ViT under identical conditions using a large simulation dataset of patterns spanning seven crystalline phases and a small set of real laboratory measurements of four reference materials. Four evaluation scenarios---in-domain simulated, in-domain real, zero-shot transfer, and transfer learning with fine-tuning---explicitly quantify the synthetic-to-real domain gap. Both architectures achieve near-perfect classification and regression on simulated data. On real measurements, the ViT outperforms the CNN overall, reducing RMSE by 31\% and MAE by 35\%, while the CNN retains an advantage for phases with sharp, well-resolved peaks and transfers more robustly in the zero-shot setting. Fine-tuning on a small set of real labeled measurements largely closes the domain gap for both architectures, confirming the practical viability of the simulation-to-real transfer pipeline for automated mineral QPA.