The mechanical properties at small length scales are not only significant for understanding the intriguing size-dependent behaviors but also critical for device applications. Nanoindentation via atomic force microscopy is widely used for small-scale mechanical testing, yet determining the Young's modulus of quasi-2D films from freestanding force-displacement curve of nanoindentation remains challenging, complicated by both bending and stretching that are highly nonlinear. To overcome these difficulties, a machine learning model is developed based on the back propagation (BP) neural network and finite element training to accurately determine the Young's modulus, pretension, and thickness of freestanding films from nanoindentation force-displacement curves simultaneously, improving the computational efficiency by two orders of magnitude over conventional brute force curve fitting. Using this technique, anomalously high apparent Young's modulus is discovered of 2.8nm thick PbZr0.2Ti0.8O3 (PZT) film as large as 229.4±12.1GPa, much higher than the bulk value. The enhancement can be attributed to the strain gradient-induced flexoelectric effect, and the corresponding flexoelectric coefficient is estimated to be ≈200nCm-1. The method is developed to enable an artificial intelligence (AI) system to study the mechanical properties of a wide range of low-dimensional materials.