Railway systems play a vital role in modern transportation and Predictive-Cognitive Maintenance (PCM) has emerged as a transformative approach in the context of Advanced Integrated Railway Management for ensuring the safety, reliability, and efficiency of these systems. PCM leverages data analytics and machine learning to optimize railway system maintenance. This requires effective structural health monitoring (SHM) using low-cost sensor devices. This paper presents a prototype solar-powered wireless sensor node with a 3-axis MEMS accelerometer and energy-harvesting features for monitoring rail track vibrations. The node contains a microcontroller that runs embedded machine-learning models to preprocess the vibration data after train crossing. Abnormal vibrations, indicative of defects, were detected in real time using the TinyML inference at the edge. Instead of raw data, only the model results were wirelessly transmitted to a digital twin in the cloud. The digital twin aggregates data across the rail network for system-level assessment of the RUL and maintenance planning. This edge computing approach minimizes wireless transmission and cloud storage compared to raw sensor streaming. Embedded ML enables real-time damage detection, whereas the cloud digital twin enables system-level prognosis insights. The solar-powered platform enables long-term remote monitoring at low cost without wiring or battery changes. A full-scale physical model was used to validate the edge node prototypes against calculation models and wired accelerometers for impulse loads. The results demonstrate that these nodes can provide a sensor layer for cost-effective PCM in railway systems. In summary, this work proposes an edge computing and embedded ML approach for SHM that integrates cloud-based digital twins to enable the predictive-cognitive maintenance of railway infrastructure. Wireless nodes demonstrate potential for low-cost, convenient, and automated rail health monitoring.